Hello. I hope you had a pleasant Qingming Holiday.
I recently purchased several Motor Bridge Capes and BBGs as the core of a motor control solution. It seems that my setup is not working correctly. The BBG cannot seem to detect the ST coprocessor over the I2C interface. I followed your setup guide at seeedstudio.com/wiki/Motor_Bridge_Cape_v1.0. I have experience with I2C on BBB/Linux, but I am not sure how to proceed here. Help would be appreciated. Descriptions and images below. Thanks in advance.
Configuration:
-Motor Bridge Cape connected to BBG.
-Ethernet connected to BBG.
-DC power supply running @ 12V connected to Battery +/ screw blocks (see image).
-BBG running preloaded eMMC Debian Image 2015-10-20.
-MotorBridgeCapeforBBG_BBB python software installed (github.com/Seeed-Studio/MotorBr … forBBG_BBB).
Observations:
-BBG runs ok.
-PWR LED on Motor Bridge Cape is lit.
-MotorBridgeCapeforBBG_BBB python software shows error “Error accessing 0x4B: Check your I2C address” (see image).
-Linux command “i2cdetect -y -r 1” shows no device at 0x4B, or any other address (see image).
It is also worth noting that I tried this with a second Motor Bridge Cape unit paired with a BBB (not a BBG) and saw the same result. It seems unlikely that I would have 2 faulty Motor Bridge Cape units? I must be missing something here?
I have one more unopened Motor Bridge Cape unit that I can test with. Thanks!
1, Connect cape to your BBG/BBB, download seeedstudio.com/wiki/images/ … e_v1.0.zip to your BBG/BBB
2, unzip the file
3, Goto the directory Motor Bridge Cape V1.0 (cd Motor Bridge Cape V1.0)
4, upload firmware (make flash_firmware)
Thanks, Xiangnan. Everything works after following your instructions to flash the co-processor firmware.
A few questions:
Did the units ship without firmware, or with the wrong firmware? I ordered 3 of these from Digikey, and 2 of these have this problem. I will try the 3rd unit. I might suggest that you post these instructions in your product page for your customers.
Do you make the source code for the co-processor firmware available?
Is it possible to stack these capes to add more motor control channels. I realize that there would need to be a way to set the I2C address of each co-processor, and there is the issue of power.
Sorry for this problem and thanks for your feedback!
[b]for your question:[/b]
We made a mistake in uploading the firmware and it leads to the problem you found.We will update the wiki to let you and other customers know how to solve this problem.
2.We will upload the source code soon.If you want it now, please share me your email address. If you find any other problem, please notify us. Thanks!
3.There is a register(addr: 0X08) which is used for setting the I2C address. But it will be reset as 0X4B if the cape restarted( after you wrote one byte address into 0X08, you should change your I2C address and do not reset the cape). I have reviewed the source code and find that it will come into conflict with some commands.This has been solved in latest version.
I would like to take a look at the source code if possible. My email is [email protected].
Regarding the I2C address, I don’t understand how that approach would work. If I stack the capes and they are both at address 0x4B on the same I2C bus, there will be an address conflict. How would I use the register setting to change only one of the cape boards?
In the development process, i have not considered this stuiation(stack capes).I2C address changed just for interim use. But now, I have modified the source code to realize the function.
once you change the I2C address, It will not be used immediately. You should send another command to save it into flash and restart the capes automatically. It will load the new address to initialize I2C. For the details, i will tell you via email. Please kindly check the email. And if you have other good advices, please share me. :smiley:
Getting the same error as OP, with very similar setup so far except using BBB and using Debian GNU/Linux 8 2016-01-24
When I try to flash the firmware using (make flash_firmware) I get an error though. I’m relatively new with BBB, so I’m not sure if there are other ways to ‘flash the firmware.’
Thanks in advance.
EDIT: I have tried using chmod a+x to give me permission to execute, and then came across a problem with dev/tty02 in the flasher, which I changed to dev/tty2 (to match what was in my /dev list), but still no luck in successfully flashing the firmware.
Did your BBB boot with the latest system image from BeagleBone forum?
If so, you have to enable the Serial port 2. It was not enabled by default.
To enable serial port 2, add a line with “cape_enable=bone_capemgr.enable_partno=BB-UART2” to /boot/uEnv.txt and reboot your device. Change the port back to dev/ttyO2 in flasher file.
Hope this can solve your problem, Let me know if further detail/explanation would be helpful.
I read what was available in this forum. I am getting an issue:
• Error accessing 0x4B: Check your I2C address
I have a MotorBridgeCape with a BBG. I attached two motors and a battery. I used the PuTTY to run my python program I got from the MotorBridge Wiki.
Do I need to update firmware for the MotorBridgeCape or allow the serial bus with python-smbus?
I am new to these issues and I need support.
Seth
silver2row on GitHub
P.S. If someone knows the answer, please try to contact me. Oh and here is a photograph/video. It is my PuTTY Terminal. I cannot access the .zip file once I unzipped it. Please provide support.
Thanks for the reply. I have tried adding it into the uEnv.txt file as you said, but still no luck in using “make flash_firmware”. I have added my output errors if they will help you understand my current situation. My Linux info is as follows: Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:56 UTC 2015 armv7l GNU/Linux
EDIT (May 4th, 2016): I noticed a typo in enabling the Serial Port 2 with BB_UART2 and have now changed it to BB-UART2, but still can’t get it to work. I have tried both formats for 3.8 and 4.1 for enabling the Serial Port 2.
Please try the commands that were mentioned earlier. I believe you have already unzipped the file since I see a directory named Motor Bridge Cape Firmware in the video. Start by running the commands before changing anything else. I just followed those commands mentioned in the earlier post of this thread.
I found that you have already fixed the issues. The solving steps of the "Motor Bridge Cape firmware issue" is updated to the wiki page [seeedstudio.com/wiki/Motor_Bridge_Cape_v1.0](http://www.seeedstudio.com/wiki/Motor_Bridge_Cape_v1.0) .