Commit Graph

10 Commits

Author SHA1 Message Date
Jeff Epler bc9ef87d05
print addl debug message 2021-12-08 21:03:06 -06:00
Jeff Epler 11c573ef95
sdcardio: Don't require reaching idle state during early init
.. which is what the addition of cmd25 made happen. We still signal
an error when failing to reach the idle state at any other time,
which _is_ different than adafruit_sdcard but I think that it is
correct.

This fixed #5600 according to Dan's testing on a GCM4 on the internal
SD card slot. There are still some ambiguous results on the MM4 with
external SD card slot on 6" jumper wires.
2021-12-08 21:03:03 -06:00
Timon a1052d5f73
Initial broadcom port for Raspberry Pi
This targets the 64-bit CPU Raspberry Pis. The BCM2711 on the Pi 4
and the BCM2837 on the Pi 3 and Zero 2W. There are 64-bit fixes
outside of the ports directory for it.

There are a couple other cleanups that were incidental:
* Use const mcu_pin_obj_t instead of omitting the const. The structs
  themselves are const because they are in ROM.
* Use PTR <-> OBJ conversions in more places. They were found when
  mp_obj_t was set to an integer type rather than pointer.
* Optimize submodule checkout because the Pi submodules are heavy
  and unnecessary for the vast majority of builds.

Fixes #4314
2021-11-22 14:54:44 -08:00
Jeff Epler 621953c960
Additional missing-prototypes fixes
I think this correctly enables missing-prototypes in atmel-samd
and raspberrypi ports.
2021-11-10 10:55:53 -06:00
Jeff Epler 015bfb6e63
remove debug print 2021-10-25 16:52:23 -05:00
Jeff Epler f22299d2b3 sdcardio: Use CMD25 across multiple writeblocks() calls
This increases write rates (of gifio from #5490) from about 2.4fps to over
5fps by making more efficient use of the SD card protocol.

Because of details of oofatfs, it usually manages 64 writes in a single
CMD25, then two writes in a different area of the SD card (presumably,
filesystem metadata).  I couldn't find where to increase "64" to a higher
number. This may depend on the allocation size of the filesystem.

I tried preallocating too, but oddly it significantly lowered the write
rate.

Any trailing data is committed when the file is close()d, or when
the `sync` method of the SDCard object is called.
2021-10-25 10:59:28 -05:00
Jeff Epler 3fb12fe289 Introduce SDCard.sync method, does nothing 2021-10-25 10:03:07 -05:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
Scott Shawcroft 733094aead
Add initial RP2040 support
The RP2040 is new microcontroller from Raspberry Pi that features
two Cortex M0s and eight PIO state machines that are good for
crunching lots of data. It has 264k RAM and a built in UF2
bootloader too.

Datasheet: https://pico.raspberrypi.org/files/rp2040_datasheet.pdf
2021-01-20 19:16:56 -08:00
Jeff Epler 57fde2e07b sdcardio: implement new library for SD card I/O
Testing performed: That a card is successfully mounted on Pygamer with
the built in SD card slot

This module is enabled for most FULL_BUILD boards, but is disabled for
samd21 ("M0"), litex, and pca10100 for various reasons.
2020-06-26 11:50:23 -05:00