I use the chip nrf51822, However, SDK8.1.0 example ble_app_uart is base on nrf51422, what I need to do? just replace bsp.c ? and which bsp.c file corresponds to the nrf51822 chip? Thank you!
I use the chip nrf51822, However, SDK8.1.0 example ble_app_uart is base on nrf51422, what I need to do? just replace bsp.c ? and which bsp.c file corresponds to the nrf51822 chip? Thank you!
As Carlos says, there is no difference between nRF51822 and nRF51422 except when using ANT. That said, the board support package (BSP) is used to abstract away the differences between various boards. As such it it depend just as much on the board as the chip. If you look at in the SDK under examples\bsp\ you will see that there is a common bsp.c that is used for all. The differences between each board is handled by having a header file for each board.
Which header file to use (i.e. which board) is selected by defining the board type (E.g. in Keil go to Project -> Option for Target .... -> C/C++ and add it to the list of defines). Then the corresponding header file is included in boards.h. E.g. if you define BOARD_PCA10028
the pca10028.h is included.
Thus, if you want to use the BSP for your own product you should make a header file for that board, modify boards.h and define your board type.
The BSP tutorial gives more detailed instructions on how to use the BSP.
As Carlos says, there is no difference between nRF51822 and nRF51422 except when using ANT. That said, the board support package (BSP) is used to abstract away the differences between various boards. As such it it depend just as much on the board as the chip. If you look at in the SDK under examples\bsp\ you will see that there is a common bsp.c that is used for all. The differences between each board is handled by having a header file for each board.
Which header file to use (i.e. which board) is selected by defining the board type (E.g. in Keil go to Project -> Option for Target .... -> C/C++ and add it to the list of defines). Then the corresponding header file is included in boards.h. E.g. if you define BOARD_PCA10028
the pca10028.h is included.
Thus, if you want to use the BSP for your own product you should make a header file for that board, modify boards.h and define your board type.
The BSP tutorial gives more detailed instructions on how to use the BSP.
OK, Thank you!