cancel
Showing results for 
Search instead for 
Did you mean: 

FMC NOR Ready/Busy

XD
Associate III

Hello!

This is the first time im using NOR Flash so bear with me :)

Question #1

I screwed up and forgot to add a pullup for the open drain ready/busy NOR output.

So i've tried the ghetto approach of using the internal pullup of the STM32 as "busy wait" but it sort of doesn't work. 
The code will wait/trigger while the NOR-Flash is busy and release once its done, as expected. 

However, the flash will not be programmed unless i add a "long" delay between the writes.

Question #2

What would the downside be to using the internal pullup and triggering a rising edge interrupt when writing a buffer to the memory?
It doesn't seem possible to "automatically" write a buffer to memory or use DMA. ie that you have to write one word at a time but only send the "program command sequence" the first time if you are within the timing?

 

Memory timings
Program time: 11 us
Access time: 70 ns

HAL_NOR_WriteOperation_Enable(&hnor1);

uint16_t *AddressPtr = (uint16_t *)0x60000000UL;

char TestString[] = "HelloWorld";
std::memset(TestString, 0, 10);
uint16_t *StringPtr = (uint16_t*)TestString;

for(uint8_t i = 0; i < 5; i++){

	while((NOR_WAIT_GPIO_Port->IDR & NOR_WAIT_Pin) == 0);
	HAL_NOR_Program(&hnor1, (uint32_t *)(AddressPtr), StringPtr++);
	AddressPtr++;

	//HAL_Delay(10);

}


std::memset(TestString, 0, 10);
StringPtr = (uint16_t*)TestString;

HAL_NOR_ReadBuffer(&hnor1, 0x60000000UL, StringPtr, 5);

 

0 REPLIES 0