Skip to content

NOR simulator assumes sizeof(ULONG) == 4 #22

@jiri-novotny

Description

@jiri-novotny

Provided example assumes sizeof(ULONG) is 4B

    /* Setup pointer.  */
    pointer =  (ULONG *) &nor_memory_area[0];

    /* Loop to erase block.  */
    words =  sizeof(nor_memory_area)/(sizeof(ULONG));
    while (words--)
    {
        
        /* Erase word of block.  */
        *pointer++ =  (ULONG) 0xFFFFFFFF;
    }

when changed to

memset((uint8_t *) &nor_memory_area[0], 0xFF, sizeof(FLASH_BLOCK) * TOTAL_BLOCKS);

subsequent write/read test failes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    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