Problem with SD card tasks on mainboard v4 #57
Replies: 3 comments 3 replies
-
|
Hey Giacomo, this is certainly a unique issue you're having! I haven't encountered what you're describing, but I'm happy to help work through some troubleshooting ideas with you. Based on what you described, my first instinct is that something is going on with the SD card. First question: how do you know it's crashing? Are you able to tell what part of your code is crashing? One option is to wrap your entire code in a try/except catch that will log the error onto flash memory, let me know if you need help implementing that. An easier option is to use the RGB led to help you debug. If my theory about the SD card is correct, then we should see it early in the pycubed.py init sequence. To test this, add a line to your pycubed.py code to set the RGB a certain color if the SD card fails to initialize (under the except SD card try/case. I'm traveling at the moment so I can't easily link to the correct line number). Test and see if you reach that spot in your code before crashing. Add debug colors like this in other areas of your code to see if you can figure out the cause. If you can post pictures of your hardware setup I might be able to spot something there as well. If you don't want to post them here on the forums you can email them to pycubed support email. Other things to check are your RBF jumpers and the inhibits. How are you turning the cubesat on when not connected to the PC? Releasing an inhibit? Check that you're using sufficient gauge wire foe your inhibits. How is your grounding between the mainboard, chassis, and battery? Once we know what is crashing, then we figure out why and how to fix it. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Max, I sent to you an email with some pictures of the hardware setup, I hope they can be useful (the object of the mail is Hardware setup Giacomo). Unfortunately, during these days I can't execute tests on cubesat because it is currently employed for other tests. I will try to get you updates as soon as possible. Thank you again for your help. |
Beta Was this translation helpful? Give feedback.
-
|
Hi Max, during these day we maked some tests. The problem seems to be on serial communications (SPI and I2C), in fact the code crashes only with these functions (and only when we power the system with batteries). We tried to remove these parts of code from the main code and everything works fine. We also tried with a new board, but the result is still the same. The payload board integrates an Arduino board, is it possible that the problem is on the speed of the SPI? How do i check and modify the baud rate of the SPI on Pycubed board? The current baud rate of the Arduino SPI is 2 MHz. Regarding the I2C, the same problem occurs with the IMU reading. If we power the board with batteries the code doesn't work, but from Mu Editor the code runs correctly. In our case we don't have devices that use I2C on the payload board, only the IMU on the mainboard. In your opinion, can it be useful try to change the baud rate of SPI and I2C? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Max,
I have a problem with my mainboard v4 board. I'll try to explain the problem in the best way.
I have a complete cubesat with payload and PyCubed mainboard v4. If I power the cubesat with batteries the flight software crashes immediately, but if I connect the cubesat to PC and I start the software via Mu editor the flight software works correctly. The strange thing is that if I start the software via PC (with batteries connected) and then I disconnect the cubesat from PC, the flight software runs correctly after the disconnection. I noticed that this problem occurs only when there are tasks which use the SD card. If I remove these kind of tasks, the flight software runs correctly in any case, even by powering the board immediately with batteries (without using Mu).
What could be the problem?
Waiting for your kind reply, thank you.
See you soon,
Giacomo
Beta Was this translation helpful? Give feedback.
All reactions