Page 1 of 1

MOD 54417 Rev 1.7+ Pins 17 and 18

Posted: Thu Mar 24, 2016 7:19 am
by rlupish
The I/O requirements of our application have expanded, so that we need more GPIO pins. From what I read in the Datasheet, updated July 25, 2014, Pins 17 and 18 are available as GPIO, Input Only, and the constants.h file indicates one can set this function with defined parameter PINJ2_17_GPIO (J2[17].function(PINJ2_17_GPIO) ) and similarly for pin 18.

Just to confirm: Is my understanding above correct? :?:

Thanks,

Ron

Re: MOD 54417 Rev 1.7+ Pins 17 and 18

Posted: Fri Mar 25, 2016 9:31 am
by dciliske
Yes, and no, and now for the politics of backwards compatibility. The Pins functions for 17 and 18 are not compatible with rev 1.7+ of the MOD54415 or any rev of the MOD54417. However, since the Pins functionality existed prior to the PCN switching over to USB, we felt it best to not silently break someone's software in future updates to the NNDK. Thus, they still point to the I2C pins for performing the Pins functions.

Instead, to read the state of pins 17 and 18, you will need to access the USB controller registers as follows:

Code: Select all

bool pin17_state = sim2.usb_otg.portsc1 & 0x00000400;
bool pin18_state = sim2.usb_otg.portsc1 & 0x00000800;
-Dan