SGPIO code for use with M0 in a LPC4370

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by JohnR on Thu Apr 10 09:09:38 MST 2014

In earlier versions of some SGPIO code, the interrupt handler was SGPIO_IRQHandler(void).

Now I have upgraded to LPCXpresso v7.1.1 and LPCOpen but the SGPIO handlers seem to have changed substantially.

The UM10503 manual does not seem to cover the use of SGPIO in the MOSub subsystem.

In the cr_startup_lpc43xx-m0sub.c file we have

void SGPIO_INPUT_IRQHandler(void) ALIAS(IntDefaultHandler)
void SGPIO_MATCH_IRQHandler(void) ALIAS(IntDefaultHandler)
void SGPIO_SHIFT_IRQHandler(void) ALIAS(IntDefaultHandler)
void SGPIO_POS_IRQHandler(void) ALIAS(IntDefaultHandler)

In cmsis_43xx_m0sub.h we have
SGPIO_INPUT_IRQn                  =   4,/*!<   4  SGPIO Input bit match            */
SGPIO_MATCH_IRQn                  =   5,/*!<   5  SGPIO Pattern Match              */
SGPIO_SHIFT_IRQn                  =   6,/*!<   6  SGPIO Shift Clock                */
SGPIO_POS_IRQn                    =   7,/*!<   7  SGPIO Capture Clock              */

I used SGPIO_POS_IRQHandler and SGPIO_POS_IRQn  which works but this was shear guesswork.

Could you please update the UM10503 manual accordingly.