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

Problems with Flashing and GPIO enabling | nRF52840

Dear All,

    I am using  (nRF52840) in one of my design. 

 

     Application program we have taken examples\peripheral\usbd_ble_uart\pca10056\s140\arm5_no_packs code as base code.

 

    - Flashing a NEW CHIP first time Booting never happens

           Made a new board and flashing the chip first time it never gets booted.  Couple of boards i flashed some random program from example and then if i flash the actual application programs it will run.  Currently the random flashing also not giving solution.

    

          Kindly provide an example program or steps to flash the new chip.

 

    - GPIO program kindly verify if below initialisation is enough.

 

          problem here is other than P0.06 every other GPIO is working fine.  Pls guide if any issue from our initialisation.

            

#define S32_SPIS_CS_PIN            NRF_GPIO_PIN_MAP(0,6) 
#define S32_SPIS_MISO_PIN NRF_GPIO_PIN_MAP(0,8)
#define S32_SPIS_MOSI_PIN NRF_GPIO_PIN_MAP(0,4)
#define S32_SPIS_SCK_PIN NRF_GPIO_PIN_MAP(0,12)
#define S32_BT_INT_PIN NRF_GPIO_PIN_MAP(1,9)

nrf_gpio_cfg_output (S32_SPIS_CS_PIN);
nrf_gpio_cfg_output (S32_SPIS_MISO_PIN);
nrf_gpio_cfg_output (S32_SPIS_MOSI_PIN);
nrf_gpio_cfg_output (S32_SPIS_SCK_PIN);
nrf_gpio_cfg_output (S32_BT_INT_PIN);


while(1){
#if 1
nrf_gpio_pin_set (S32_SPIS_CS_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_set (S32_SPIS_MISO_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_set (S32_SPIS_MOSI_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_set (S32_SPIS_SCK_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_set (S32_BT_INT_PIN);
nrf_delay_ms(50);

nrf_gpio_pin_clear (S32_SPIS_CS_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_clear (S32_SPIS_MISO_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_clear (S32_SPIS_MOSI_PIN);
nrf_delay_ms(5);

nrf_gpio_pin_clear (S32_SPIS_SCK_PIN);

nrf_delay_ms(5);

nrf_gpio_pin_clear (S32_BT_INT_PIN);
nrf_delay_ms(50);
#endif

Parents
  • Do you get an error of any kind when trying to use P1.09 as a GPIO? The only thing I can think that might have happened is that this is used as a TRACE pin, but this should be disabled by default in our examples. You can try setting the TRACECONFIG->TRACEMUC field to 0, just keep in mind that only bit 16 and 17 should be set, and the rest of the TRACECONFIG register should be left as is.

    Best regards,

    Simon

Reply
  • Do you get an error of any kind when trying to use P1.09 as a GPIO? The only thing I can think that might have happened is that this is used as a TRACE pin, but this should be disabled by default in our examples. You can try setting the TRACECONFIG->TRACEMUC field to 0, just keep in mind that only bit 16 and 17 should be set, and the rest of the TRACECONFIG register should be left as is.

    Best regards,

    Simon

Children
No Data
Related