[En-Nut-Discussion] Bug in Ethernut found - was: SD-card problems
Bernd Walter
enut at cicely.de
Mon Mar 2 20:05:45 CET 2009
Probably it is already fixed, since I'm still using 4.6.3.
The code failed to put the card into SPI mode.
The comment above was correct, but disagreeing with the code.
Maybe just luck got the card in SPI mode everywhere else.
[188]devel# [187]devel# diff -u mmcard.orig mmcard.c
--- mmcard.orig 2009-03-02 20:02:43.551952257 +0100
+++ mmcard.c 2009-03-02 20:02:50.659675771 +0100
@@ -366,7 +366,7 @@
* 80 bits of ones with deactivated chip select will put the card
* in SPI mode.
*/
- (*ifc->mmcifc_cs) (0);
+ (*ifc->mmcifc_cs) (1);
for (i = 0; i < 10; i++) {
(*ifc->mmcifc_io) (0xFF);
}
Exit 1
--
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
More information about the En-Nut-Discussion
mailing list