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
  • It's a ble_uart_app version modified for my project. I need read a sensor value every five minutes (so i need the timer). But for that example, i only use that:

    int main(void)
    {
        uint32_t err_code;
    		int i;
    		
        // Initialize.
        //APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
    		//app_timer_create(&timer_ID,APP_TIMER_MODE_REPEATED,TIMER0_IRQHandler);
    		//twi_master_init();
    		//configuration();
        //buttons_leds_init(&erase_bonds);
        ble_stack_init();
    		/*datos[0] = (NRF_FICR->DEVICEADDR[1] & 0x0000ff00) >> 8;
    		datos[0] =  datos[0]|0xC0;
    		datos[2] = (NRF_FICR->DEVICEADDR[1] & 0x000000ff);
    		datos[4] = (NRF_FICR->DEVICEADDR[0] & 0xff000000) >> 24;
    		datos[6] = (NRF_FICR->DEVICEADDR[0] & 0x00ff0000) >> 16;
    		datos[8] = (NRF_FICR->DEVICEADDR[0] & 0x0000ff00) >> 8;
    		datos[10] = (NRF_FICR->DEVICEADDR[0] & 0x000000ff);
    		for(i=0;i<11;i++){
    			hex_to_byte(datos,i);
    			i++;
    		}*/
    	gap_params_init();
        services_init();
        advertising_init();
        conn_params_init();
    		
        err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
        APP_ERROR_CHECK(err_code);
      
        // Enter main loop.
        for (;;)
        {
         // power_manage();
        }
    }
    

    I just want to see in my smartphone the advertising. All are comments (except the ble functions)

Reply
  • It's a ble_uart_app version modified for my project. I need read a sensor value every five minutes (so i need the timer). But for that example, i only use that:

    int main(void)
    {
        uint32_t err_code;
    		int i;
    		
        // Initialize.
        //APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_MAX_TIMERS, APP_TIMER_OP_QUEUE_SIZE, false);
    		//app_timer_create(&timer_ID,APP_TIMER_MODE_REPEATED,TIMER0_IRQHandler);
    		//twi_master_init();
    		//configuration();
        //buttons_leds_init(&erase_bonds);
        ble_stack_init();
    		/*datos[0] = (NRF_FICR->DEVICEADDR[1] & 0x0000ff00) >> 8;
    		datos[0] =  datos[0]|0xC0;
    		datos[2] = (NRF_FICR->DEVICEADDR[1] & 0x000000ff);
    		datos[4] = (NRF_FICR->DEVICEADDR[0] & 0xff000000) >> 24;
    		datos[6] = (NRF_FICR->DEVICEADDR[0] & 0x00ff0000) >> 16;
    		datos[8] = (NRF_FICR->DEVICEADDR[0] & 0x0000ff00) >> 8;
    		datos[10] = (NRF_FICR->DEVICEADDR[0] & 0x000000ff);
    		for(i=0;i<11;i++){
    			hex_to_byte(datos,i);
    			i++;
    		}*/
    	gap_params_init();
        services_init();
        advertising_init();
        conn_params_init();
    		
        err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
        APP_ERROR_CHECK(err_code);
      
        // Enter main loop.
        for (;;)
        {
         // power_manage();
        }
    }
    

    I just want to see in my smartphone the advertising. All are comments (except the ble functions)

Children
No Data
Related