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

BLE Mesh examples on PCA10059 , buttons cant work !

hi,

I have 2 PCA10056 and few PCA10059 for BLE mesh testing.

need to configure dongle as provisioner.

unable to configure mesh provisioner example(also other client server which use buttons ) for PCA10059 hardware

SDK used : nRF5_SDK_17.0.0_9d13099 and nrf5_SDK_for_Mesh_v4.2.0

modification done to provisioner project
nrf5_SDK_for_Mesh_v4.2.0_src\examples\provisioner

have added button to the PCA10059 on a breadboard .same PORT as DK ( P0 ) but different pins 

Added/modified missing and relevant defines for leds and buttons to

1.----D:\nRF52840_DK\nRF5_SDK_17.0.0_9d13099\components\boards\pca10059.h


// Each LED color is considered a separate LED
#define LEDS_NUMBER    4

#define LED1_G         NRF_GPIO_PIN_MAP(0,6)
#define LED2_R         NRF_GPIO_PIN_MAP(0,8)
#define LED2_G         NRF_GPIO_PIN_MAP(1,9)   //dk no access
#define LED2_B         NRF_GPIO_PIN_MAP(0,12)
#define LED_START      LED_1
#define LED_STOP       LED_4

#define LED_1          LED1_G
#define LED_2          LED2_R
#define LED_3          LED2_G
#define LED_4          LED2_B

#define LEDS_ACTIVE_STATE 0

#define LEDS_LIST { LED_1, LED_2, LED_3, LED_4 }

#define LEDS_INV_MASK  LEDS_MASK

#define BSP_LED_0      LED_1
#define BSP_LED_1      LED_2
#define BSP_LED_2      LED_3
#define BSP_LED_3      LED_4

// There is only one button for the application
// as the second button is used for a RESET.
//#define BUTTONS_NUMBER 1
//#define BUTTON_1 NRF_GPIO_PIN_MAP(1,6) // (1<<5)|(6&1F)= (0x20)|(0x6)=0x26=38
// USING only PORT0 for buttons.
#define BUTTONS_NUMBER 4
#define BUTTON_1 NRF_GPIO_PIN_MAP(0,20) //20
#define BUTTON_2 NRF_GPIO_PIN_MAP(0,22) //22 
#define BUTTON_3 NRF_GPIO_PIN_MAP(0,24) //24  same as pca10056 button3
#define BUTTON_4 NRF_GPIO_PIN_MAP(0,17) //17

----

Adding the board to simple_hal
2 ----D:\nRF52840_DK\nrf5_SDK_for_Mesh_v4.2.0_src\examples\common\include\simple_hal.h


/** Boards with user buttons */
#define BUTTON_BOARD (defined(BOARD_PCA10040) || defined(BOARD_PCA10028) || defined(BOARD_PCA10056) || defined(BOARD_PCA10100) || defined(BOARD_PCA10059)) //lint -e491 // Suppress "non-standard use of 'defined' preprocessor operator"

----

on PCA10059

all leds works ok ,
buttons 1,2,4 dont work except for button3 ( same as in PCA10056 ).
if i use RTT for inputs the provisioner work ok !. ( not possible to connect all Dongles to DK during testing )

Did i miss something to modify to make it work for PCA10059.

on PCA10056

I also check the compiled code for PCA10059 on the PCA10056 board !
same issue  buttons 1,2,4 dont work, onboard button3 works, button3 maped on breadboard works, 

all leds works when using RTT inputs.  ( added leds/buttons on the breadboard from DK P6 and P24 header ,vdd and gnd from P1).

same issue for almost all  mesh samples for PCA10059 for BLE mesh examples.

Thanks and regards,

Parents Reply Children
  • hi simonr,

    project compiles correctly

    led on dongle works ok.

    as the on board button  on pca100059 is on PORT 1.x ,

    I did not want to change the interrupt routines . so assign buttons to same PORT 0.x  but different io lines

    I did follow the dongle programming guide.

    I modified the example mesh provisioner to use pca10059 board header file pca10059.h file ,

    Added the project define for pca10059 board to common preprocessor section.

    ----

    BOARD_PCA10059

    ----

    I have also added the 10059 board to simple_hal.h file (/** Boards with user buttons */) define.

    If you need remote access to the development PC(teamviewer/anydesk) ,

    Please message me in private  to schedule accordingly !

Related