Re: Set GPIO with SYS_INIT() #gpio #nrf52840 #sys_init


Bob Recny
 
Edited

Thanks Erik for the pointer. There was a race issue in initializing the pin before the driver was ready.

I changed from

SYS_INIT(bmd345_fem_init, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

to

SYS_INIT(board_init, APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

and the pins worked as expected.

Join users@lists.zephyrproject.org to automatically receive all group messages.