Bill Greiman
Well-known member
What is a reasonable interrupt priority for the SDHC DMA done interrupt?
I am testing with the priority that WMXZ uses.
My Interrupt Service Routine is small.
Second question.
It appears that the microSD socket has a card detect switch. Is this true and is it connected to a pin?
Without a card detect switch it is possible to use the SD DAT3 pin. I don't like this method since it can't be used while the card is active.
SD cards have an internal 50K pull-up on DAT3. The card can be detected by the SDHC controller if there is a large external pull-down on DAT3.
NXP recommends a 750K pull-down that can be disconnected by software. I assume this is not present on Teensy 3.6.
I am testing with the priority that WMXZ uses.
Code:
NVIC_SET_PRIORITY(IRQ_SDHC, 6*16);
My Interrupt Service Routine is small.
Code:
void sdhc_isr() {
SDHC_IRQSIGEN = 0;
m_irqstat = SDHC_IRQSTAT;
SDHC_IRQSTAT = m_irqstat;
m_dmaDone = true;
}
It appears that the microSD socket has a card detect switch. Is this true and is it connected to a pin?
Without a card detect switch it is possible to use the SD DAT3 pin. I don't like this method since it can't be used while the card is active.
SD cards have an internal 50K pull-up on DAT3. The card can be detected by the SDHC controller if there is a large external pull-down on DAT3.
NXP recommends a 750K pull-down that can be disconnected by software. I assume this is not present on Teensy 3.6.