GPIO Not working in Nuvoton M487

Created at 2021-05-10 16:20:42

We are testing RT-Thread on the Nuvoton NuMaker-PFM-M487 board using
Keil V5 IDE for development, we have successfully created test project as below,
compiled it and tested it,
FinSH and msh commands are working,
rt_kprintf("%i: Hello!\n",i) also working but three LEDs are not blinking when we run / debug this program

main.c code file attached:
main.c

Kindly help

更多

Follower
0
Views
907
1 Answer
FLBF_5496
FLBF_5496 2021-05-11

Hi,

User determines pin index by invoking NU_GET_PININDEX macro on Nuvoton platform.
EX:

#define LEDR   NU_GET_PININDEX(NU_PH, 0)

For your case,

#define LED_R     NU_GET_PININDEX(NU_PH, 0) // PH.0
#define LED_Y     NU_GET_PININDEX(NU_PH, 1) // PH.1
#define LED_G     NU_GET_PININDEX(NU_PH, 2) // PH.2

Another example

BRs
Wayne

Write Your Answer

Log in to publish your answer,Click here to log in.

Create
Post

Share