Skip to content

A question about the address of FlashSize #190

@TinyHai

Description

@TinyHai

First, my mcu is STM32F030F4P6 which has 20 pins.

My project need to store some data in internal flash memory, and I find the program always blocking on FLASH.len().

After I change the code to:

/// Size of integrated flash
#[derive(Debug)]
#[repr(C)]
pub struct FlashSize(u16);
#[cfg(not(any(feature = "stm32f070")))]
define_ptr_type!(FlashSize, 0x1FFF_F7CC);
#[cfg(any(feature = "stm32f070"))]
define_ptr_type!(FlashSize, 0x1FFF_0000);

The program works well.

Is this a bug, or my mcu is fake?

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