I would like to report 2 bugs in the STR71x software library. Both are in the BSPI module. void BSPI_ClkFEdge(BSPI_TypeDef *BSPIx, FunctionalState NewState)is ''inverted''. When setting it to ENABLE it gets DISABLEd and vice versa. FlasgStatus BSPI_FlagStatus(BSPI_TypeDef *BSPIx, BSPI_Flags flag)doesn't reurn the correct value. (because of a faulty equal sign in the function) Are there any list of known bugs in the library? Regards /Beach/ PS. I must say that I like this 'simple' lib. Grouping all registers of a hardware module into a structure makes the code very nice looking. :D DS.
thanks. This clarifies the problem I had with a MMC card connected via the BSPI. Due to the reported bug a read followed by a write access occurs. If between both accesses the BSPI changes the addressed flag then the write operation can corrupt this flag. Regards
You are right this is a STR71x BSPI library mistake and it will be corrected in the next release. Thank you and best regards Hich :p [ This message was edited by: Hich on 07-02-2005 14:30 ]
void BSPI_TrFifoDepth(BSPI_TypeDef *BSPIx, u8 TDepth)and void BSPI_RcFifoDepth(BSPI_TypeDef *BSPIx, u8 TDepth)should accept depth values 1-10, but will only accept 1-9. 10 will set the depth to 1. /Beach
I found also a bug in the flash library in the function : void FLASH_FlagClear(flashflags Xflag)When for example, you have : FLASH_FlagStatus(FLASH_BSY0) in the WaitForLastTask(flashbanks Xbank) function. FLASH_BSY0 = 0x21; So the TempReg variable is egal to 1. So the case value for CR0 register should be ''1'' and not the ''0'', and so on ... The Lock bit in FLASH_CR0 register is not tested, it should also be tested ??? Why do I need to make a wait loop to wait the end of the write to flash execution. When the Lock bit is set all the flash is blocked, when it's released then I could write another byte, and so on... Best regards OneR