Skip to content

Incorrect page size returned from Flash IAP #8466

Closed
@LaurentLouf

Description

@LaurentLouf

Description

A minimal code to reproduce the issue would be :

#include "mbed.h"


// Internal flash interface
FlashIAP internal_flash;

int main() {
    // Initialize internal flash interface
    internal_flash.init();
    printf("Flash start %d, size %d, page size %d\r\n", internal_flash.get_flash_start(),
           internal_flash.get_flash_size(), internal_flash.get_page_size());
}

This issue being that I've got the following response on my target :

Flash start 134217728, size 262144, page size 4

So the flash start and size are coherent with my target, but the page size isn't at all. According to the doc of Flash IAP (https://os.mbed.com/docs/v5.8/mbed-os-api-doxy/classmbed_1_1_flash_i_a_p.html), the value returned is expressed in byte and I highly doubt that I have page sizes of 4 bytes (should be 2kbytes if I recall correctly). I've had to adapt a few files to support my target, but it's been a while and I don't have any problems with the changes made, so I assume that they are mostly correct. So could it be an error with the API of Flash IAP ?

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions