FlexIO_t4 icon indicating copy to clipboard operation
FlexIO_t4 copied to clipboard

FlexIOSPI_Simple hangs Teensy 4.1

Open shreekumar3d opened this issue 3 years ago • 2 comments

When this sketch is uploaded, nothing shows up on the serial monitor.

I looked at the code - found that the flex hardware arrays are not initialized right. For now my simple fix is adding a parenthesis to delimit the arrays.

Also, if initialization fails it's best not to proceed with the code. An infinite loop helps the user see the error messages & upload the code again without having to deal with the hung teensy.

These changes are in my repo https://github.com/shreekumar3d/FlexIO_t4 . I can submit pull requests too.

Thanks for your work on this, btw. This is a good starting point for my exploration of the FlexIO on the Teensy.

shreekumar3d avatar Apr 14 '21 04:04 shreekumar3d

Sorry,

I was in the process of updating the FlexIO library, to hopefully handle all of the Shifters and Timers. The manual mentions that there are 4 and 4 but actually there is 8 and 8...

Also There was some stuff off in the one of the sketches that was crashing as I was trying to print out the configuration registers, but I had not enabled the clock for all of the timers.

I just verified I can output one simple Flex Serial and read it back in on Serial using Beta Sparkfun Micromod.

you might check to see if the new stuff works now for you. Also can always send a PR and I can take a look and probably pull in.

Thanks again

KurtE avatar Apr 14 '21 16:04 KurtE

No probs. The serial works for me without issues.

~~I am mostly struggling with SPI at the moment. The SPI data lane & CS both work fine. However, I don't see any clock output. Any clues for me ?~~

SPI also works. Probably a probing issue on my part. Thanks again!

shreekumar3d avatar Apr 14 '21 16:04 shreekumar3d