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

pcb shuts down when bootloader starts - (just opened in a new thread for some order)

working with nrf52832, sdk 16.0 s132 v7.01

in the uart example i get to this place in the code :

uint32_t nrf_dfu_transports_init(nrf_dfu_observer_t observer)
{
    uint32_t const num_transports = DFU_TRANS_SECTION_ITEM_COUNT;
    uint32_t ret_val = NRF_SUCCESS;

    NRF_LOG_DEBUG("Initializing transports (found: %d)", num_transports);

    for (uint32_t i = 0; i < num_transports; i++)
    {
        nrf_dfu_transport_t * const trans = DFU_TRANS_SECTION_ITEM_GET(i);
in this line i get a pin toggle -> ret_val = trans->init_func(observer);
        if (ret_val != NRF_SUCCESS)
        {
            NRF_LOG_DEBUG("Failed to initialize transport %d, error %d", i, ret_val);
            break;
        }
    }

i get a pin toggle which makes my system do some unwanted things 

the toggle is for about 12 microseconds so it is quite short and maybe we can overcome it with hardware but i would still love to solve it in the software and understand the reason

if i use the dfu via ble example then i don't get the toggle, so where lies the difference ?

OK FOUND OUT THE ISSUE:

in my system (pcb) pin p0_05 is a power control pin and in the nrf board  PCA_10040 it is the uart RTS_PIN_NUMBER, so can i just configure it to a different pin in my board or can i disable the flow control, will it not affect the dfu via serial, considering i use nrfutil dfu over serial on the other side ??

hope to read from you soon on that matter

best regards

Ziv 

Parents
  • OK FOUND OUT THE ISSUE:

    in my system (pcb) pin p0_05 is a power control pin and in the nrf board  PCA_10040 it is the uart RTS_PIN_NUMBER, so can i just configure it to a different pin in my board or can i disable the flow control, will it not affect the dfu via serial, considering i use nrfutil dfu over serial on the other side ??

    just change this setting in the sdk_config in case of working only with rx and tx there is no flow control involve

    //==========================================================
    // <q> NRF_DFU_SERIAL_UART_USES_HWFC  - HWFC configuration
     
    
    #ifndef NRF_DFU_SERIAL_UART_USES_HWFC
    #define NRF_DFU_SERIAL_UART_USES_HWFC 0 // 1
    #endif

  • well i thought i was that smart but i am using nrfutil which has it's own define for working with hwfc and from a bit of reading in the forum i understand it is not an easy no risk configuration change 

    also now the nrfutil runs from a pc with windows but in the final product it will have to be configured to yocto (arm-linux) 

    any advice on how to configure this right on the nrfutil side, for both options will be most appreciated 

    best regards 

    Ziv 

Reply
  • well i thought i was that smart but i am using nrfutil which has it's own define for working with hwfc and from a bit of reading in the forum i understand it is not an easy no risk configuration change 

    also now the nrfutil runs from a pc with windows but in the final product it will have to be configured to yocto (arm-linux) 

    any advice on how to configure this right on the nrfutil side, for both options will be most appreciated 

    best regards 

    Ziv 

Children
  • ok found the answer (i think, cause i always find out more goats as i move along :)  ) in this post (Sigurd replay seems to work with out to many configurations):

    https://devzone.nordicsemi.com/f/nordic-q-a/62831/problem-with-serial-dfu-when-performing-from-nrfutil

    use this line of command

    nrfutil dfu serial -pkg <App_file_name>.zip -p COM<X> -b 9600 -fc 0 -prn 1

    don't forget to change the baud rate in the bootloader:

    // <o> UART_DEFAULT_CONFIG_BAUDRATE  - Default Baudrate
     
    // <323584=> 1200 baud 
    // <643072=> 2400 baud 
    // <1290240=> 4800 baud 
    // <2576384=> 9600 baud 
    // <3862528=> 14400 baud 
    // <5152768=> 19200 baud 
    // <7716864=> 28800 baud 
    // <10289152=> 38400 baud 
    // <15400960=> 57600 baud 
    // <20615168=> 76800 baud 
    // <30801920=> 115200 baud 
    // <61865984=> 230400 baud 
    // <67108864=> 250000 baud 
    // <121634816=> 460800 baud 
    // <251658240=> 921600 baud 
    // <268435456=> 1000000 baud 
    
    #ifndef UART_DEFAULT_CONFIG_BAUDRATE
    #define UART_DEFAULT_CONFIG_BAUDRATE 2576384// 30801920
    #endif

    thanks to all 

Related