2019-02-27 09:37 AM
Hello,
Checking stm32h743 eval examples (cube) of NOR, there is a wait on busy/ready signal in code:
/* NOR Ready/Busy signal GPIO definitions */
#define NOR_READY_BUSY_PIN GPIO_PIN_6
#define NOR_READY_BUSY_GPIO GPIOC
/**
* @brief NOR BSP Wait for Ready/Busy signal.
* @param norHandle: Pointer to NOR handle
* @param Timeout: Timeout duration
* @retval None
*/
void HAL_NOR_MspWait(NOR_HandleTypeDef *norHandle, uint32_t Timeout)
{
uint32_t timeout = Timeout;
/* Polling on Ready/Busy signal */
while((HAL_GPIO_ReadPin(NOR_READY_BUSY_GPIO, NOR_READY_BUSY_PIN) != NOR_BUSY_STATE) && (timeout > 0))
{
timeout--;
}
timeout = Timeout;
/* Polling on Ready/Busy signal */
while((HAL_GPIO_ReadPin(NOR_READY_BUSY_GPIO, NOR_READY_BUSY_PIN) != NOR_READY_STATE) && (timeout > 0))
{
timeout--;
}
}
But PC6 is connected to SDIO, not to NOR, so it seems like a bug.
I also think that this "wrong" waiting can explain another case which I've posted about problematic programming performance (large timing) in NOR programming.
What do you think ?
Thanks,
ranran
2019-02-27 09:58 AM
>>What do you think ?
I believe that's a different issue..
2019-02-27 10:00 AM
It looks like it waits on a wrong pin, which has a different role (SDIO) .