cancel
Showing results for 
Search instead for 
Did you mean: 

HI, I am using SPC560b54l5 discovery board, I want to configure multiple GPIOs at runtime; based on the message received from CAN, when I configure particular pin as I/O by using pal_setgroupmode function but it not works ,can anyone face this issue?

Rpala.1
Associate II

please help me.

with regards,

Ragu.

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 REPLY 1
Rpala.1
Associate II

Hi all, At-least I found one way to do configure GPIOs mode(input or output) at run time. I found that static const spc_siu_init_t spc_siu_init[] structure present in board.c file contains all our pins configuration but it is a constant structure; so, I made one copy of the same file and change the constant structure to ordinary structure and the I change input as output and vice-versa by doing on register level writing on SIU register like this SIU.PCR[spc_siu_run[PIN_GPIO0].pcr_index].R = (iomode_t)(PAL_MODE_OUTPUT_PUSHPULL); This will configure GPIO0 as output, initially I configure as input.

Thq

with Regards,

Ragu