Skip to content

Device configuration should not unlock memory (at least for SAM D5x/E5x) #30

@abauske

Description

@abauske

According to SAM D5x/E5x datasheet only main memory is handled by Region Lock Bits. However the current implementation of the CAN bootloader performs a NVMCTRL_RegionUnlock(addr) in static void device_config_write(uint32_t addr) resulting in Error Flags PROGE and ADDRE (and DONE) being set. Because ADDRE is set subsequent NVMCTRL_USER_ROW_RowErase fails.

One could argue though that the second part is more a fault of NVMCTRL_USER_ROW_RowErase as it does not clear INTFLAGS....

I will not prepare a PR as I don't know if other Microcontrollers this library applies to use Region Lock Bits for User Row. For SAM D5x/E5x though it would be just a case of dropping that RegionUnlock line of code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions