FlexIO Black Magic

Mavriq

Member
I've seen in many threads about Flexio being very particular when it comes to working. For example, if you set up one of their examples, it works. However, modifying things sometimes causes unexplained issues.

Well in my experimenting I found one for sure:
If you set SHIFTCTL before SHIFTCFG it doesn't work correctly for a few cycles and then it starts to. I was seeing buffer corruption for the first few writes. I was also seeing it spit out some nulls even before Flexio was enabled. in FlexSerial I see some commented out code about about clearing SHIFTSTAT being the cause, it may be this that was causing it?

Anyhow, I'm putting together some docs on FlexIO and was wondering if anyone else knows of any of these Black Magic Gotchas?
 
Last edited:
SHIFTCTL contains SMOD which sets the shifter's operating mode. Setting the mode to anything other than "disabled" makes it active. This isn't a gotcha, you are expected to configure it before you take the brakes off...
 
SHIFTCTL contains SMOD which sets the shifter's operating mode. Setting the mode to anything other than "disabled" makes it active. This isn't a gotcha, you are expected to configure it before you take the brakes off...
How should someone know this if the manual doesn't mention it (I haven't found where)? Especially if the Flexio module hasn't been enabled yet. It also works itself out after a few cycles.

<EDIT>
The only thing I can find in the manual related to the order of setting registers is:
The shifter immediately loads a stop bit when the Shifter is
initially configured for Transmit mode if a stop bit is enabled.
That seems to indicate (to me at least) that you would need to set a stop bit in CFG BEFORE CTL for that to happen. Of course that can be interpreted in a couple of different ways as can a lot of the manual. Maybe not black magic, but an easy mistake to make if you read that.
 
Last edited:
Back
Top