-
Notifications
You must be signed in to change notification settings - Fork 52
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting error code 090 on new microbit #44
Comments
Hi @KalbeAbbas An 090 panic code is a hardware configuration error. You can see the list of panic codes here: Looking at the SPI driver, it looks like you are trying to create the SPI driver multiple times: Could you perhaps share some of your code so we can see how this might be happening? |
Hi @finneyj, Thanks. I first define function for allocating SPI pins:
Then I allocate pins, set frequency and mode:
and these are functions to write and read to/from SD card, they are called every time when writing:
These are low-level functions, all other function call these functions at lowest-level. Let me know if you want any other info |
Forgot to mention, I call allocSPI() function to allocate SPI only once at the beginning. |
That's curious. I'm afraid I can't see any other way that panic code can be generated apart from calling the NRF52SPI constructor multiple times... All the other causes are raised from other modules:
|
Are you really, really sure there's no way the your initialization code is somehow being called twice? Maybe try putting some debug statement in there to be sure? ;) |
Good idea. I'll try that :) |
I guess you are right, its called each new cycle. Let me confirm if the same error code comes again. |
@finneyj Thank you. That solved the issue :) |
I am closing this issue now |
Great! Thanks for reporting back @KalbeAbbas If it make you feel better I'm teaching an Computer Science class as we speak.... and you fixed your code faster than my students did. ;) |
I am using SPI functions for writing to SD card with new microbit and getting error code 090 on microbit screen every time after writing two lines to SD card as if its is periodic, writes two lines shows error code 090 and restarts again.
The text was updated successfully, but these errors were encountered: