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.

RM48L952: RM48L952

Part Number: RM48L952
Other Parts Discussed in Thread: HALCOGEN

Hi I am aware of how to set up the ECLK in Halcogen but it will be great of someone can share an example code of how to setup the ECLK pin to use it as a GIO. I am planning to use it as an input pin and want to read the status of it. So how would the example code look like gioGetBit(? , ?)

Thanks for the help in advance. 

  • Hi Udit,

    0th bit in SYSPC1 register will control the ECLK pin functionality, and it should be 0 to act as GIO

    0th bit in SYSPC2 register will control the direction of the pin, and it should also be 0 to configure as input pin

    0th bit in SYSPC3 register will give the logic state of the pin, so the bit value on this register gives the pin logic state.

    And you can easily configure pin as gio and direction as input from HALCoGen as below.

    See the above configuration initializes the ECLK pin as GIO and input direction in systemInit function

    After this you just need to read the 0th bit in the SYSPC3 register in your main.c to get the input value, like as shown below.

    Just add above lines to your main.c.

    --

    Thanks & Regards,
    Jagadish.