I want to use the iMX7 in my System without any physically connected display running WEC2013. I started with the schematics of the IRIS V1.1 board and the iMX7D maunual and tried to figured out, which gpios were available.
Due to a bug of the SPI driver I found out earlier and no chance that this bug get fixed I was told by Toradex to use SODIMM 133 as a manual nCS. And I have to use tis pin exclusively, so no other usage of this GPIO 2 module is allowed. ==> GPIO2 is only godd for that nCS.
This gives the list of remaining GPIOs:
And, if using any of that free GPIOs, please note, that toggling a pin within an ISR also means, that that the whole GPIO bank isn’t available for other threads!!
Is the above list correct, or is some of the GPIO-banks, or ports still used by WEC2013?
Thanks a lot for helping.
With best regards
First let me render your statement about GPIO bank reservation more precisely:
It is critical to have multiple parallel threads writing to the same GPIO bank - the i.MX6 does not feature Bit-Set and Bit-Clear registers for GPIOs, therefore read-modify-write operations are required to change single bits. If such a read-modify-write is interrupted by a write to the same register, the result is unpredictable.
Using GPIO inputs in parallel threads is perfectly fine, as long as only one thread is writing to the register, or as long as read-modify-write operations are synchronized, for example by the use of a mutex.
The GPIOs you listed in your question are not occupied by WEC2013, you are free to use them for your own application.
I mised to add a few restrictions regarding the GPIOs:
- GPIO3.P23-P28 could be used by the display controller. Make sure you use only 18 bits per pixel (not 24)
- GPIO4.P20 / P21 are shorted on the module to GPIO2.P3 (PWM_D) / GPIO2.P0 (PWM_A). Of course only one of the two shorted functions can be used at any time