> #### Updates

This release only targets USB Corecell (no change for SPI connexion type).
The USB-SPI bridge firmware, which runs on the STM32 MCU of the USB Corecell, has
been updated for API clean-up and robustness improvements.

> #### Changes

* MCU: USB-SPI bridge firmware binary v1.0.0.
	* Removed obsolete commands (ORDER_ID__REQ_SPI, ORDER_ID__ACK_SPI)
	* Command index shifted after obsolete commands removal (ORDER_ID__REQ_MULTIPLE_SPI, ORDER_ID__ACK_MULTIPLE_SPI)
	* Command parser sends ORDER_ID__UNKNOW_CMD in case of wrong command size.
	* Code clean-up (typo fixed, comments added...)
	* Implemented Error_Handler() function to reset the MCU in case of fatal error.
	* Fixed a potential roll-over issue in read_write_spi() function.
	* Increased delay tolerance for host feedback on USB transfers.
* HAL: Command interface updated for MCU firmware v1.0.0.
	* Removed obsolete commands from enum order_id_e
	* Shifted commands enum index according to USB-SPI bridge update.
	* Removed decode_ack_spi_access() unused function.
* HAL: Added timing debug information under DEBUG_MCU.
This commit is contained in:
Michael Coracin 2021-04-22 14:34:46 +02:00
commit 4b42025d17
5 changed files with 49 additions and 35 deletions

View file

@ -28,7 +28,7 @@ License: Revised BSD License, see LICENSE.TXT file include in the project
/* -------------------------------------------------------------------------- */
/* --- PUBLIC CONSTANTS ----------------------------------------------------- */
static const char mcu_version_string[] = "00.02.06";
static const char mcu_version_string[] = "01.00.00";
#define MAX_SIZE_COMMAND ( 4200 )
#define MAX_SPI_COMMAND ( MAX_SIZE_COMMAND - CMD_OFFSET__DATA - 1 )
@ -45,18 +45,16 @@ typedef enum order_id_e
ORDER_ID__REQ_BOOTLOADER_MODE = 0x02,
ORDER_ID__REQ_RESET = 0x03,
ORDER_ID__REQ_WRITE_GPIO = 0x04,
ORDER_ID__REQ_SPI = 0x05, /* deprecated */
ORDER_ID__REQ_MULTIPLE_SPI = 0x06,
ORDER_ID__REQ_MULTIPLE_SPI = 0x05,
ORDER_ID__ACK_PING = 0x40,
ORDER_ID__ACK_GET_STATUS = 0x41,
ORDER_ID__ACK_BOOTLOADER_MODE = 0x42,
ORDER_ID__ACK_RESET = 0x43,
ORDER_ID__ACK_WRITE_GPIO = 0x44,
ORDER_ID__ACK_SPI = 0x45, /* deprecated */
ORDER_ID__ACK_MULTIPLE_SPI = 0x46,
ORDER_ID__ACK_MULTIPLE_SPI = 0x45,
ORDER_ID__UNKNOW_CMD = 0xFF
ORDER_ID__CMD_ERROR = 0xFF
} order_id_t;
typedef enum