ATSAML11 non_volatile example

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi team,

 

I am Jothinathan from Zettaone Technologies, Bangalore.

 

The ATSAML11 has used master processor in project. We trying to configure and retain and rewrite the 2KB Data Flash Write-While-Read (WWR) section for non-volatile data storage. 

 

Then the Atmel Studio V7.0 has used for development. We are unable to get library to write/read non-volatile. We need to library write and read in non volatile memory space.

 

Regards,

Jothinathan

Regards,
Jothinathan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you try start.atmel.com? According to the generated example code the Flash driver should handle data flash.

/**
 * Example of using FLASH_0 to read and write buffer.
 */
void FLASH_0_example(void)
{
    uint32_t i;

    /* Target address.
     * Make sure the address is reasonable to your application.
     * It might a address in NVM memory of FLASH, DATAFLASH, AUX FLASH.
     */
    uint32_t target_addr = FLASH_ADDR + FLASH_SIZE - NVMCTRL_ROW_SIZE;

    /* Initialize source data */
    for (i = 0; i < FLASH_PAGE_SIZE; i++) {
        flash_src_data[i] = i;
    }

    /* Erase row in flash */
    FLASH_0_erase_row(target_addr);

    /* Write data to flash */
    FLASH_0_write_page(target_addr, flash_src_data, FLASH_PAGE_SIZE);

    /* Read data from flash */
    FLASH_0_read(target_addr, flash_chk_data, FLASH_PAGE_SIZE);

    /* Check data */
    for (i = 0; i < FLASH_PAGE_SIZE; i++) {
        if (flash_src_data[i] != flash_chk_data[i]) {
            while (1)
                ; /* Error happen */
        }
    }
}

/Lars

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Raving Lunatic,

 

Thanks for your response, we are working to ATSAML11 internal non volatile memory(fuse region).

 

provide your support to get library of erase, write and read API's specific address.

Regards,
Jothinathan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dear Raving Lunatic,

 

We have used the above sample API's. We are able to access non volatile flash memory region.

Regards,
Jothinathan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for the update.
 

Dear Raving Lunatic,

Although on occasion an accurate description note that this is not my name here, it is the "Level".

/Lars