Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

On ST25DV after writing to FTM buffer cannot write to EEPROM via I2C with NRF52832.

app_twi_perform() returns 0x03 == NRF_ERROR_INTERNAL.

Reset board with button does not help.

After Power Cycle can update EEPROM successfully.

Accessing FTM buffer with proprietary smartphone app.

NRF52832 built with nRF SDK 12.3.

  • Hello,

    So you need to power cycle the DK (which also power cycles the EEPROM, I guess?) in order for it to work?

    What happens if you try to initialize the EEPROM twice without power cycling it in between?

    If you look at the unmodified twi_master_using_app_twi_pca10040 example from SDK12.3.0, you should see:

    static void twi_config(void)
    {
        uint32_t err_code;
    
        nrf_drv_twi_config_t const config = {
           .scl                = ARDUINO_SCL_PIN,
           .sda                = ARDUINO_SDA_PIN,
           .frequency          = NRF_TWI_FREQ_100K,
           .interrupt_priority = APP_IRQ_PRIORITY_LOWEST,
           .clear_bus_init     = false
        };
    
        APP_TWI_INIT(&m_app_twi, &config, MAX_PENDING_TRANSACTIONS, err_code);
        APP_ERROR_CHECK(err_code);
    }

    Can you try to change .clear_bus_init = false to .clear_bus_init = true?

    See if that helps, and let me know if it doesn't.

    Best regards,

    Edvin

  • Hello Edvin,

    unfortunately that solution did not work.

    The best answer came from ST forum:

    https://community.st.com/s/question/0D73W000001MsCn/

    Problem was that "it is not possible to write into EEPROM if FTM is activated".

    And logical solution was to deactivate FTM before interacting with EEPROM.

    Anyway, I appreciate your involvement as a good sign of a great customer support.

Related