Mercurial > public > ostc4
annotate Small_CPU/Inc/spi.h @ 1040:74be24428049 GasConsumption
Bugfix Fontpack update for large blocks:
The update of a font pack with a size > 768000 byte was interrupted and a manuel switch to bootloader had to be performed to get the font pack flashed. Rootcause was a missing address adjustment during the block read back function which caused a false error detection. Blocks > 768000 are read in two step while only one buffer is used for comparation. To fill the correct data into this buffer a dummy read of the flash data was added to get the data pointers to the correct offset. Another bug was regardings the read back itself where only the first byte was checked. After array indexing the complete buffer is noch verified.
| author | Ideenmodellierer |
|---|---|
| date | Mon, 13 Oct 2025 20:54:25 +0200 |
| parents | b3685fbada3b |
| children |
| rev | line source |
|---|---|
| 38 | 1 /** |
| 2 ****************************************************************************** | |
| 3 * @file spi.h | |
| 4 * @author heinrichs weikamp gmbh | |
| 5 * @version V0.0.1 | |
| 6 * @date 16-Sept-2014 | |
| 7 * @brief Header file for spi control | |
| 8 ****************************************************************************** | |
| 9 * @attention | |
| 10 * | |
| 11 * <h2><center>© COPYRIGHT(c) 2014 heinrichs weikamp</center></h2> | |
| 12 * | |
| 13 ****************************************************************************** | |
| 14 */ | |
| 15 | |
| 16 /* Define to prevent recursive inclusion -------------------------------------*/ | |
| 17 #ifndef SPI_H | |
| 18 #define SPI_H | |
| 19 | |
| 20 #ifdef __cplusplus | |
| 21 extern "C" { | |
| 22 #endif | |
| 23 | |
| 24 /* Includes ------------------------------------------------------------------*/ | |
| 25 #include "stm32f4xx_hal.h" | |
| 26 | |
| 27 extern SPI_HandleTypeDef hspi1; | |
| 28 | |
| 29 void MX_SPI1_Init(void); | |
| 30 //void SPI_Start_single_TxRx_with_Master_and_Stop_ChipSelectControl(void); | |
| 31 void SPI_Start_single_TxRx_with_Master(void); | |
| 32 void SPI_synchronize_with_Master(void); | |
|
264
b3685fbada3b
Sync to Main 100ms time stamp & added Reinitialization of globals after startup
ideenmodellierer
parents:
184
diff
changeset
|
33 uint8_t SPI_Evaluate_RX_Data(void); /*process the data received during last 100ms cycle */ |
| 184 | 34 |
| 38 | 35 void MX_SPI_DeInit(void); |
| 36 | |
| 37 /* button adjust */ | |
| 38 void MX_SPI3_Init(void); | |
| 39 void MX_SPI3_DeInit(void); | |
| 40 uint8_t SPI3_ButtonAdjust(uint8_t *arrayInput, uint8_t *arrayOutput); | |
| 104 | 41 void MX_SPI_DeInit(void); |
| 42 | |
| 43 | |
| 38 | 44 #ifdef __cplusplus |
| 45 } | |
| 46 #endif | |
| 47 #endif /* SPI_H */ | |
| 48 | |
| 49 /** | |
| 50 * @} | |
| 51 */ | |
| 52 | |
| 53 /** | |
| 54 * @} | |
| 55 */ | |
| 56 | |
| 57 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
