This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

board support package(bsp) Issue

main.cHI Nordic, I don't want bsp.c in my project. So I removed the bsp.c and included custom_board as mentioned in devzone.nordicsemi.com/.../ I am also using UART for communication. so I add #include "app_uart.h" in main.c changed #if defined(BOARD_CUSTOM)//BOARD_PCA10031 ...... #else .... #endif

My question is if I remove bsp.h in main and also below code. err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),NULL); my code is not working.unable to see UART communication. kindly help me to overcome bsp issue.

also please guide me what is the use of this timer. APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, NULL);

Thanks and Regards Lakshman,PMP,PMI-RMP

  • can you check first if you can run the uart example SDKXX\example\peripheral\uart? That is not using any bsp or timer modules

  • HI Aryan, Thanks for your reply. Its working with uart example SDKXX\example\peripheral\uart. But the program not using interrupt. Moreover I am using the ble_uart_c as central. please find the attached main.c

    1.removed app_gpiote.h and added nrf_drv_gpiote.h & app_uart.h 2.added Options for target -->......\componmain.cents\ble\ble_services\ble_uart_c (created folder and added ble_uart.c & ble_uart.h above 2 steps to avoid compilation error

    1. //Lakshman if i remove below two line UART wont work. APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, NULL); err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),NULL);

    kindly advise. I don't want timer and bsp package. I planned to control the gpio directly.

    Thanks and Regards Lakshman,PMP,PMI-RMP

    Note : unable add main.c file in add a comment. please find main.c in intial question

  • Found the issue. err_code = bsp_init(BSP_INIT_LED | BSP_INIT_BUTTONS, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER),NULL); after removing bsp package. I forget to remove below code. APP_ERROR_CHECK(err_code);

    Thank you for your support.

    Regards Lakshman,PMP,PMI-RMP

Related