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

PTR5518 module doesn't work (nrf51822)

Hello,

I'm trying to program that module, but i can't do it correctly.

I'm using a program that works fine in nrf51 DK, but when I program this in ptr5518 my smartphone can't found it. What have I to keep in mind when programming a different module to nRF51 DK? Because even the advertising doesn't works...

Memory?

Thank you so much!

EDIT: Well, I had a memory problem, my configuration is:

IROM: Start 0x18000 Size 0x28000

IRAM: Start 0x20002000 Size 0x4000

But i have got a new problem, the program is resetting continuously. I have debugged and i seen that the resets occur when the app_timer_create is called, so I think the problem is the clock.

Any help???

Parents
  • The error occur in app_create_timer when the "conn_params_init" function is called. Could be the connection constants the problem?

    My connection constant are:

    #define APP_ADV_INTERVAL                64                                          
    #define APP_ADV_TIMEOUT_IN_SECONDS      180                                        
    
    #define APP_TIMER_PRESCALER             0                                           
    #define APP_TIMER_MAX_TIMERS            (2 + BSP_APP_TIMERS_NUMBER)                 
    #define APP_TIMER_OP_QUEUE_SIZE         4                                           
    
    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)      
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(75, UNIT_1_25_MS)             
    
    #define SLAVE_LATENCY                   0                                           
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)             
    #define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(5000, APP_TIMER_PRESCALER) 
    #define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(30000, APP_TIMER_PRESCALER)
    #define MAX_CONN_PARAMS_UPDATE_COUNT    3 
    

    And the clock in "ble_stack_init":

    NRF_CLOCK -> XTALFREQ =  0 ; 
        NRF_CLOCK -> EVENTS_HFCLKSTARTED =  0 ; 
        NRF_CLOCK -> TASKS_HFCLKSTART =  1 ; 
        while  ( NRF_CLOCK -> EVENTS_HFCLKSTARTED ==  0 ); 
        SOFTDEVICE_HANDLER_INIT ( NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION ,  false );
    
Reply
  • The error occur in app_create_timer when the "conn_params_init" function is called. Could be the connection constants the problem?

    My connection constant are:

    #define APP_ADV_INTERVAL                64                                          
    #define APP_ADV_TIMEOUT_IN_SECONDS      180                                        
    
    #define APP_TIMER_PRESCALER             0                                           
    #define APP_TIMER_MAX_TIMERS            (2 + BSP_APP_TIMERS_NUMBER)                 
    #define APP_TIMER_OP_QUEUE_SIZE         4                                           
    
    #define MIN_CONN_INTERVAL               MSEC_TO_UNITS(20, UNIT_1_25_MS)      
    #define MAX_CONN_INTERVAL               MSEC_TO_UNITS(75, UNIT_1_25_MS)             
    
    #define SLAVE_LATENCY                   0                                           
    #define CONN_SUP_TIMEOUT                MSEC_TO_UNITS(4000, UNIT_10_MS)             
    #define FIRST_CONN_PARAMS_UPDATE_DELAY  APP_TIMER_TICKS(5000, APP_TIMER_PRESCALER) 
    #define NEXT_CONN_PARAMS_UPDATE_DELAY   APP_TIMER_TICKS(30000, APP_TIMER_PRESCALER)
    #define MAX_CONN_PARAMS_UPDATE_COUNT    3 
    

    And the clock in "ble_stack_init":

    NRF_CLOCK -> XTALFREQ =  0 ; 
        NRF_CLOCK -> EVENTS_HFCLKSTARTED =  0 ; 
        NRF_CLOCK -> TASKS_HFCLKSTART =  1 ; 
        while  ( NRF_CLOCK -> EVENTS_HFCLKSTARTED ==  0 ); 
        SOFTDEVICE_HANDLER_INIT ( NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION ,  false );
    
Children
No Data
Related