Open arkap opened 2 years ago
I made the adalogger example and it worked for me back then.. Are you pulling sd_cs
high after initializing it? I'm also wondering if lowering the SPI speed even lower helps, or maybe some delay between detecting chip inserted and trying to initialize helps.
Can you tell what kind of reset occurs and why? Could you be panicking?
Thanks for the ideas. I do pull sd_cs
high. I accidentally clipped that line from my snippet above initially. A lower speed hasn't helped, unfortunately.
How can I find out which kind of reset occurs? I'm using panic_halt
so I expect the chip to stop in case of a panic and not reset.
I'm currently trying to get the arduino MKRZERO's builtin SD card reader to work. I've made sure my hardware works by uploading and running an arduino sketch and I've used the
feather_m0
'sadalogger
example as a starting point. This is how I configure the SPII noticed that the logic of the chip detect pin
sd_cd
seems to be inverted. So I'm waiting untilsd_cd
is low and try to initialize:What's weird is that I run into the timeout only if the card is already inserted when I power on the MKRZERO. Plugging in a card while it is running seems to reset the device. I'd be grateful for any advise or pointers to helpful resources.