read/write failures on new T4.1 builtin SD card
Closed this issue · 4 comments
On T4.1 builtin SD card, reading a file would terminate with an error (DEBE DECE bits set). Sketch with same uSD card would work on T4.1 with teensy SD lib, and it would work on T4.0 with SdFat-beta.
Fix was to change DSE(4) back to DSE(1) SdioTeensy.cpp. Not sure if that breaks something else, or why you changed it to DSE(4). additional testing ongoing ...
I don't recall why the mod was made and don't have time to pursue this.
OK, defragster pointed out that DSE(4) is still required for the Teensy 4.0 breakout boards. So a conditional fix to SdioTeensy.cpp is needed,
static void enableGPIO(bool enable) {
const uint32_t CLOCK_MASK = IOMUXC_SW_PAD_CTL_PAD_PKE |
#if defined(ARDUINO_TEENSY41)
IOMUXC_SW_PAD_CTL_PAD_DSE(1) |
#else
IOMUXC_SW_PAD_CTL_PAD_DSE(4) | ///// WHG
#endif
IOMUXC_SW_PAD_CTL_PAD_SPEED(2);
I made a new release with your fix. Please test it, I don't have a T4.1.
Looks good. I tested on T4.1 and T4.0. thanks
you are on the list for a free T4.1, see
https://forum.pjrc.com/threads/60532-Teensy-4-1-Beta-Test