2021-10-12 01:23 AM
Hi
My code stops after i use the HAL_NAND_Read_ID function, Also the debugger stops working and i can see no errors to solve.
Thanks for helping me.
2021-10-12 04:34 AM
Hello @Arman Ilmak ,
Check if you have the same conditions related to the NAND Flash as described in the STM32H743xI/G Errata sheet.
If possible to share your code if this issue is not resolved, and please provide more information to understand the cause of the error.
Which Cube example did you looked to? Which Firmware version are you using ?
Are you using CubeMX for generating the code?
Imen
2021-10-12 05:35 AM
I use cubemx v6.3.0 as code generator and stm32h7 v1.8.0 softwarepacket.
I just config the nand timing and generated the code.
Here is the main code:
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_USART1_UART_Init();
MX_FMC_Init();
/* USER CODE BEGIN 2 */
HAL_UART_Receive_DMA(&huart1,gsm_rx_buf,sizeof(gsm_rx_buf));
if(HAL_NAND_Read_ID(&hnand1, &my_nand_flash) != HAL_OK)
{
Error_Handler();
}
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
I used this document for timing and schematics.
2021-10-20 11:07 AM
Hi @Arman Ilmak ,
Sorry for the delayed reply on this, I missed your reply.
I think your issue is related to the known limitation with CubeMX v6.3.0 when DMA is used: that the MX_DMA_Init() shall be called BEFORE any other peripheral initialization (Please see this post for more details).
I'll be waiting for your feedback and let me know if this solved your issue.
When your question is answered, please close this topic by choosing Select as Best.
Imen
2021-10-31 10:31 AM
Hi again Imen
I tried everything about this nand flash thing but still the problem is not solved.
Im just using fmc without any other dma or nothing else but with keil mdk arm the debugger stops after i launch the read id line. Just the erase page works. even when i try write page the debugger stops working.
I tried the same code with cube ide. The debugger does not stop but the hole code not excecuting corectly when i use read id function.