본문 바로가기
임베디드.일렉트로닉스/nRF52

nRF52 . 플래시 메모리 쓰기, 지우기

by i.got.it 2023. 7. 24.

 

SoftDevice 활용시 플래시 쓰기 , 지우기

펌웨어에서 SoftDevice 활용하는 경우에는 플래시 메모리 쓰기, 지우기 위하여 직접  NVMC 이용하지 못하며, SoftdDevice 에서 제공하는 아래 함수 이용하여 쓰기 지우기 해야함. 또한 이 함수들은 비동기함수(= non-blocking 함수) 여서 함수 호출시 실행 성공 여부 무관하게 즉시 리턴되며, 플래시 쓰기 , 지우기 성공여부는 이벤트로 제공된다. 

지우기, 쓰기  함수 호출이후 발생하는 이벤트

 

sd_flash_page_erase

 

S130 SoftDevice v2.0.1: Functions

Flash Erase page. Commands to erase a flash page If the SoftDevice is enabled: This call initiates the flash access command, and its completion will be communicated to the application with exactly one of the following events: If the SoftDevice is not enabl

infocenter.nordicsemi.com

 

함수상세 

uint32_t sd_flash_page_erase	(	uint32_t 	page_number	)

Parameters

[in] page_number Pagenumber of the page to erase

 

 

 sd_flash_write 

 

S130 SoftDevice v2.0.1: Functions

Flash Erase page. Commands to erase a flash page If the SoftDevice is enabled: This call initiates the flash access command, and its completion will be communicated to the application with exactly one of the following events: If the SoftDevice is not enabl

infocenter.nordicsemi.com

 

 

함수 상세 

uint32_t sd_flash_write	(
    uint32_t *const 	p_dst,
    uint32_t const *const 	p_src,
    uint32_t 	size 
)

Parameters

[in] p_dst Pointer to start of flash location to be written.
[in] p_src Pointer to buffer with data to be written.
[in] size Number of 32-bit words to write. Maximum size is 256 32-bit words for nRF51 and 1024 for nRF52.

 

 

 

 

 

 

 

 

플래시 메모리  예제 코드 

 

nRF5 SDK v17.1.0: Flash Write Example

The Flash Write Example allows to access flash memory using console commands. You can use the following commands: flash write " " - Add a new string to the flash memory. flash read - List all added strings. flash erase - Erase the flash memory. You can fin

infocenter.nordicsemi.com

 

 

 

연관 

 

 

nRF52840 . 메모리 레이아웃 . RAM , Flash , NVMC

nRF52840 메모리 - Flash 1024kByte - RAM 256kByte 메모리 레이아웃 Flash - Non-volatile memory Flash memory is divided into 256 pages of 4 kB each that can be accessed by the CPU via the ICODE and DCODE buses . Writing to flash memory is managed by

igotit.tistory.com

 

 

 

nRF52. MBR, bootloader , SoftDevice , Application , 플래시 메모리 배치

메모리에서 주소가 고정되어있는 영역은 MBR 의 시작, 끝주소및 SoftDevice 의 시작주소( MBR 의 끝 주소와 동일함)뿐이다. 그 외에 SodftDevice 끝주소, Application 시작, 끝 주소, Bootloader 시작주소는 가변

igotit.tistory.com

 

 

 

상위정리

https://igotit.tistory.com/244 의 nRF52

 

STM32. nRF52. ESP32. EFM8. EFM32. PSoC 활용 정리.

STM32. nRF52. ESP32. EFM8. EFM32. PSoC 총정리 제조사 칩 주요특징 실리콘랩 8bit MCU EFM8 시리즈 32bit EFM32 시리즈 EFM8 싸다. STM STM32 . 최고 항상 만족. Cypress pSoC pSoC6 은 기대해볼만. NORDIC nRF52 블투 무선솔루

igotit.tistory.com

 

 

 

 


첫 등록 : 2023.07.24

최종 수정 : 

단축 주소 : https://igotit.tistory.com/4737


 

댓글



 

비트코인




암호화폐       외환/나스닥/골드       암호화폐/외환/나스닥/골드 암호화폐/외환/나스닥/골드   암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)     롤오버 이자 없는 스왑프리계좌
( 스왑프리 암호화폐도 거래 가능 )    
MT4, MT5 , cTrader 모두 지원     FTMO 계좌 매매운용. MT4,MT5