manitou: Sounds like you are having some pretty good luck.
Paul (and others): On Serial6 stuff, just pushed up a minor change to my fork/branch I mentioned earlier, where I believe I now update the TIE/TCIE flags hopefully correctly using BITBAND.
That is I copied a couple of defines (renamed a couple).
Code:
#define GPIO_BITBAND_ADDR(reg, bit) (((uint32_t)&(reg) - 0x40000000) * 32 + (bit) * 4 + 0x42000000)
#define GPIO_BITBAND_PTR(reg, bit) ((uint32_t *)GPIO_BITBAND_ADDR((reg), (bit)))
#define BITBAND_SET_BIT(reg, bit) (*GPIO_BITBAND_PTR((reg), (bit)) = 1)
#define BITBAND_CLR_BIT(reg, bit) (*GPIO_BITBAND_PTR((reg), (bit)) = 0)
#define TCIE_BIT 22
#define TIE_BIT 23
And for example in the putchar function, I now do it like:
Code:
//LPUART0_CTRL |= LPUART_CTRL_TIE; // enable the transmit interrupt
BITBAND_SET_BIT(LPUART0_CTRL, TIE_BIT);
The commented out line was what I was doing earlier. Is this the correct direction to go? Should we move these level of macros out of here and pins_teensy.c into some header.
I did rebuild a test program with these changes and it still runs.