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

Hardfault_handler

Dear Sir, I am trying to access max30101 via nrf51422. When I am calling the function it is falling into Hardfault_handler & not getting out of it. I don't know anything about Hardfault_handler. Please tell me about the same & how to get out of this handler. Regards, Manoj

Parents
  • ok. I have a code of stm32 accessing max30101 & its working well. So I have implemented the same code in nrf only by changing the functions. For example ,the function HAL_I2C_Master_Transmit(&hi2c1, MAX30101_DEVICE_ADDRESS, &MAX30101_INT_STATUS, 1, 10); is replaced by nrf_drv_twi_tx(&p_twi_instance,MAX30101_DEVICE_ADDRESS, &MAX30101_INT_STATUS, 1, 10);

    Now there is one more function called State = HAL_I2C_IsDeviceReady(&hi2c1, 0XAE, 1, 1) in stm32; which is replaced by State = twi_transfer(&p_twi_instance, 0XAE, 1, 1); At this point i am facing hardfault. So please tell me how shall i check the status slave ?

Reply
  • ok. I have a code of stm32 accessing max30101 & its working well. So I have implemented the same code in nrf only by changing the functions. For example ,the function HAL_I2C_Master_Transmit(&hi2c1, MAX30101_DEVICE_ADDRESS, &MAX30101_INT_STATUS, 1, 10); is replaced by nrf_drv_twi_tx(&p_twi_instance,MAX30101_DEVICE_ADDRESS, &MAX30101_INT_STATUS, 1, 10);

    Now there is one more function called State = HAL_I2C_IsDeviceReady(&hi2c1, 0XAE, 1, 1) in stm32; which is replaced by State = twi_transfer(&p_twi_instance, 0XAE, 1, 1); At this point i am facing hardfault. So please tell me how shall i check the status slave ?

Children
Related