This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL2-570LC43 GIO Interrupts

Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

Hi Anthony,

I am facing an issue on LaunchPadxl2 TMS570LC4357.

First, I wanted to send Ethernet packets via the LaunchPad EMAC. To do this, I have followed the settings detailed in the project demo lwIP found on the wiki page mentioned above. This has worked fine, I have been able to send Ethernet packets from the LaunchPad to a computer.

But now, I would like to send these packets when a gpio interruption is detected. I have tried to use the different gpio pins available on the LaunchPadxl2. The documentation delivered with the LaunchPadxl2 shows that the GIOA[0], GIOA[1], GIOA[2], GIOA[5], GIOA[6], GIOA[7] are available on the 2x20 pins female on the bottom side of the LaunchPad. These 6 pins are respectively named on the LaunchPad: PA0, PA1, PA2, PA5, PA6 and PA7.

Therefore, I have tried to use these 6 different pins to generate interruptions. On HalCoGen, I have enabled GIO driver in the driver Table, I have checked GIOA in the Pinmux table (this had already been done because GIOA[3] and GIO[4] must be driven high to release the phy from reset and power down).

Then, in GIO/Port A Tab I have selected the following settings for GIOA[0], GIOA[1], GIOA[2], GIOA[5], GIOA[6], GIOA[7]:
-interruption enabled
-rising edge
-high priority

However, the interruptions on these different pins don’t seem to work for the moment. I have tried to send 3.3V pulses on the pins PA0, PA1, PA2, PA5, PA6 and PA7 but it didn’t generate any interruption. I know the interruptions don’t work because I don’t have the notifications expected.

Concerning the gio initialization and the notifications, here is what I do in the “main.c”:

gioInit();
_enable_IRQ();
_enable_interrupt_();
gioEnableNotification(gioPORTA,0U);
gioEnableNotification(gioPORTA,1U);
gioEnableNotification(gioPORTA,2U);
gioEnableNotification(gioPORTA,5U);
gioEnableNotification(gioPORTA,6U);
gioEnableNotification(gioPORTA,7U);

Actually, I have run previously the same kind of test on the TMS570LC4357 HDK and it worked just fine. So I think there is something wrong in my GIO configuration on HalCoGen, but I can’t find out the solution.

I hope that you will have some idea about the reasons why the interruptions don’t work on my LaunchPadxl2.

Thanks in advance
Best Regards,
Adrien
  • Adrien,

    There is more than just 'gioEnableNotification' that you need to do to get interrupts from these pins.

    First, the default state of the 'Input Pin Muxing' tab seems to line up w. the LaunchPad usage for those headers you refer to but please check that you have the 'Input Pin Muxing' setup correctly too. The 'Pin Muxing' tab controls the output capability of the GIO but for interrupts you need to make sure the input is coming from the right pin.

    Then you need to enable the interrupt and select the edge and priority level on the "GIO" and "Port A" tab.
    The default is to have the 'Enable' box unchecked.

    After that in the TMS570LC4357 VIM Channel 0-31 tab you need to make sure GIO High (ch 9) or GIO Low (23) is enabled for IRQ, depending on which level (high or low) you setup inside the GIO module. And then you need to check that the VIM RAM shows 'gioHighLevelInterrupt' as the vector for channel 9 instead of 'phantomInterrupt' (or likewise the similar vector for the low level). This last one should happen automatically if you just enable the channel but worth checking it.

    And the other test to do is to just drive a level on the GIO pin, and confirm that you see this level in the GIO data in register bit of the corresponding pin. That way you can make sure the GIO is seeing the levels you think it is supposed to be seeing. This is an easy test to do w. the debugger attached and viewing the GIO registers w. refresh turned on.
  • Hi Anthony,

    Thank you very much for your very quick and accurate answer.
    You were right, I had forgotten to enable GIO High (ch 9) in VIM Channel 0-31 tab. The interruption is now working.

    Many thanks
    Best Regards,
    Adrien