2022-03-15 03:03 AM
File stm32f4xx_hal_nand.c has changed in version 1.27.0 of the STM32CubeF4 package, but nothing is mentioned in the release notes.
Also, in version 1.26.2, there was a 2017 copyright in the file, while in 1.27.0, there is a 2016 copyright. Is there any regression on this file?
2022-03-15 05:57 AM
There don't appear to be any regressions.
The changes mostly involve addition of "#if defined(FMC_Bank2_3) || defined(FSMC_Bank2_3)" guards on statements and some DSB instructions.
2022-03-15 07:10 AM
Hi,
When I look at the previous file I had in my project (I thought it was with STM32CubeF4 v1.26.2, but I could be wrong), I see more changes:
In stm32f4xx_hal_nand.h, I could see these definitions in my previous version:
typedef struct
{
uint32_t PageSize; /*Number of data bytes per page - expected 00h, 20h, 00h, 00h*/
uint16_t SpareAreaSize; /*Number of spare bytes per page - expected C0h, 01h*/
...
}NAND_MemOrgTypeDef;
HAL_StatusTypeDef HAL_NAND_Read_Parameter(NAND_HandleTypeDef *hnand, NAND_MemOrgTypeDef *pNAND_MemOrg);
#define NAND_CMD_READPARAMETER ((uint8_t)0xEC)
And in stm32f4xx_hal_nand.c, I see that a couple more blocks disappeared in the most recent HAL update, like the HAL_NAND_Read_Parameter function or a check at the end of the HAL_NAND_Erase_Block function:
HAL_StatusTypeDef HAL_NAND_Read_Parameter(NAND_HandleTypeDef *hnand, NAND_MemOrgTypeDef *pNAND_MemOrg)
{...}
HAL_StatusTypeDef HAL_NAND_Erase_Block(NAND_HandleTypeDef *hnand, NAND_AddressTypeDef *pAddress)
{
...
/* Read status until NAND is ready */
while(HAL_NAND_Read_Status(hnand) != NAND_READY)
{
if((HAL_GetTick() - tickstart ) > NAND_WRITE_TIMEOUT)
{
/* Process unlocked */
__HAL_UNLOCK(hnand);
return HAL_TIMEOUT;
}
}
...
}
Why do I have these changes and I don't see anything in the release notes? They seem substantial enough...
2022-03-15 07:16 AM
Sorry, I was wrong, I double checked with other colleagues and someone had done custom changes in stm32f4xx_hal_nand.h and stm32f4xx_hal_nand.c, so the files I was looking at were not original ST files. This is now corrected in a new version of the project...
2022-03-15 08:50 AM
Those changes are not in the GitHub repo, or anywhere else on GitHub.
As for why not everything makes it into the release notes, that's just the way it is and always has been. I would recommend doing a diff whenever you upgrade and upgrade only when necessary and not simply when it's available.
2024-01-03 11:16 AM
Well... That's a problem with NAND Flashafter the update from 1.26.2 to 1.27 and newer (1.28) when the project is generated by CubeMX. Just crashing in HardFault, because, with the same cubemx configuration..
deviceaddress = 0x70000000 prior to 1.27 and 0x80000000 after the update.