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

Sending data from EEprom over bluetooth stack

Hi

I write an application code to read and write the data from EEPROM, by using twi_hw_master.c.

its working fine. i able to read the data from eeprom what i have written.

but when i mess this source code with ble/ble_app_hrs , means i copied my application in ble main.c file.

but i am not getting same data from eeprom .

So data over bluetooth stack.(i made changes in button_event_handler also) is sending as 00.(not data what i have written in eeprom)

Kindly tell me why working application is not working in ble.

and why it is not possible to debug step by step.

Regards Balaji

  • But in button event handler.

    i want data to read from eeprom through i2c bus. and send it

    through bluetooth stack for every press of buuton 0.

    but in master control panel ,its says bluetooth connection loss ,once i press button 0.

    Kindly tell me is it not possible to access i2c in button even handler.

    static void button_event_handler(uint8_t pin_no) { switch (pin_no) { case HR_INC_BUTTON_PIN_NO:

                                                                //m_cur_heart_rate += HEART_RATE_CHANGE;
    							m_cur_heart_rate = data2;
    							dataW1[0]=dataW1[0]+2;
    							twi_master_transfer(addw, dataW1, 2, 1);
    							twi_master_transfer(addr, data1, 2, 0);
    							data2=(data1[0]<<4)|(data1[1]);
    		                                          break;
            
        case HR_DEC_BUTTON_PIN_NO:
    								 
                                                           //m_cur_heart_rate -= HEART_RATE_CHANGE;
                                                            //if (m_cur_heart_rate < MIN_HEART_RATE)
                                                             //               {
                                                        // m_cur_heart_rate = MAX_HEART_RATE; // Loop back
                                                           //                 }
                                                                    break;
            
        default:
                        APP_ERROR_HANDLER(pin_no);
    }
    

    }

Related