Due to high demand, expect some shipping delays at this time - orders may not ship for up to 2-3 business days.

Possible issue between Adafruit TinyUSB MSC and Timerinterru
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Possible issue between Adafruit TinyUSB MSC and Timerinterru

by pbdavis on Tue Jan 18, 2022 4:36 pm

A little background. I’m using an Adafruit nRF52840 Feather Express along with an Adalogger RTC with SD card. The SD card is used by the Adafruit to read and write files from external EEPROMs. Then Adafruit TinyUSB’s library (v1.7.1) is used to have the SD card act as a mass storage device on a computer. That is, the SD card appears as an USB flash drive on the computer. I’m using library NRF52_TimerInterrupt (v1.3.0) to blink and flicker 6 LEDs in the system. I have this working perfectly on 16 systems. My problem is I have one, number 17, that is working except for having a problem where the interrupt timers used by the LEDs don’t always work when the SD card is mounted on the computer. System 17 has the exact same hardware and software as the other working 16. They all have the same bootloader, v0.62. I’ve checked and the interrupt service routine that toggles the LED’s digital pin is not being called until I unmount the flash drive or I never initialize the MSC usb_msc.begin(). It is as though the interrupts get inadvertently disabled. But, if I call ISR_Timer.isEnabled() for the timer that should be blinking the LED but is not, it returns true.

I have tried using all four timers NRF_TIMER_1 - NRF_TIMER_4, as suggested by the Timerinterrupt library developer. They all have similar behavior. For example,
Code: Select all | TOGGLE FULL SIZE
// Initialize NRF52 hardware timer NRF_TIMER_3.
NRF52Timer ITimer(NRF_TIMER_3);

// Initialize NRF52_ISR_Timer.
// Each NRF52_ISR_Timer can service 16 different ISR-based timers.
NRF52_ISR_Timer ISR_Timer;

I’ve tried a new version of the bootloader, 0.6.3 – same problem.

I guess my question is, does anyone know of any issues between the NRF52_TimerInterrupt library and the Adafruit TinyUSB mass storage class? Any suggestions on how to determine what the issue is for this one specific system? Any ideas on why it would not work on only this one Adafruit board?

Posts: 5
Joined: Wed Jul 21, 2021 12:35 pm

Please be positive and constructive with your questions and comments.