SLAAEL9 October 2024 MSPM0C1104 , MSPM0L1306
Complete the following steps to evaluate the design:
Prepare the relevant hardware resources and software code as previously discussed in this document. Use the real host system to replace the PC with USB2ANY GUI. Pay attention to the I2C setup for MSPM0C1104, because PA1 is reused as the RESET pin. For software disable the reset function in SysConfig, for hardware remove the J9 connector to avoid the pulldown capacitor influence and on I2C communication. Use additional pullup resistors.
Choose the appropriate communication interface (UART, SPI, or I2C) by uncommenting the unwanted communication functions macro in expander.h, shown in Figure 5-3. Now initialize the communication interface and set the communication parameters such as baud rate, data bits, and stop bits, in the IO_expander.syscfg (if using UART).
Make sure that the transmitPacket and receivePacket functions are correctly called to send and receive data packets during communication, and verify the checksum to make sure the communication is correct.
Write functions to execute the gpioDirectionSet, gpioOutputCtl, and gpioStateRead commands by referring to Section 5.2. Send the relevant commands to the expansion module from the host and then you can verify if the GPIO direction setting, output value, and input value match the expectations.