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
  • Hi

    On the DK, pins P0.17 and P0.19-P0.23 are by default connected to the external memory, which is why you're not able to use these pins as buttons on the DK. Please see the DK user guide to see how these can be used as regular GPIOs. Have you checked if the example you're using have defined these pins as external memory pins as well? A conflict with multiple defines for these pins might be why you're not able to use them as buttons in your Dongle either, and would explain why only P0.24 is working as a button for you. You can test with a logic analyzer to see if there is any activity on pins P0.17, 20, and 22 at all.

    Best regards,

    Simon

Reply
  • Hi

    On the DK, pins P0.17 and P0.19-P0.23 are by default connected to the external memory, which is why you're not able to use these pins as buttons on the DK. Please see the DK user guide to see how these can be used as regular GPIOs. Have you checked if the example you're using have defined these pins as external memory pins as well? A conflict with multiple defines for these pins might be why you're not able to use them as buttons in your Dongle either, and would explain why only P0.24 is working as a button for you. You can test with a logic analyzer to see if there is any activity on pins P0.17, 20, and 22 at all.

    Best regards,

    Simon

Children
  • hi simonor,

    Thanks for the effort to look into the issue.

    as for as Dk this is the real issue as memory chip is connected.

    What about the same code when run on PCA10059 , which does not have the external memory connected .

    on checking the board header files of PCA10056/59 , yes the said pins are used for external memory for QSPI .

    PCA10056 board file has these 

    #define BSP_QSPI_SCK_PIN 19
    #define BSP_QSPI_CSN_PIN 17
    #define BSP_QSPI_IO0_PIN 20
    #define BSP_QSPI_IO1_PIN 21
    #define BSP_QSPI_IO2_PIN 22
    #define BSP_QSPI_IO3_PIN 23

    and thes are not defined in PCA10059  board file !,

    this should have generated a warning or error as undefined but the example does compile ok !.

    I did searched the BSP_QSPI_CSN_PIN  references in the provisioner example code could not find any files in the project . 

    can u quickly tell me where to look and disable them in the sdk/mesh-sdk so that we can quickly evaluate the

    mesh sensor-client/server on dk with dongle as provisioner. ( ordering another DK for us will take more time).

     

    Thanks and regards.  

Related