mirror of
https://github.com/dekuNukem/USB4VC.git
synced 2025-10-31 11:26:46 -07:00
added watchdog, release first firmware
This commit is contained in:
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -27,16 +27,7 @@ Project File Date: 04/07/2023
|
||||
<h2>Output:</h2>
|
||||
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
|
||||
Build target 'apple_all'
|
||||
compiling main.c...
|
||||
../Src/main.c(646): warning: #188-D: enumerated type mixed with another type
|
||||
HAL_GPIO_WritePin(ERR_LED_GPIO_Port, ERR_LED_Pin, spi_error_occured);
|
||||
../Src/main.c(716): warning: #177-D: function "MX_IWDG_Init" was declared but never referenced
|
||||
static void MX_IWDG_Init(void)
|
||||
../Src/main.c: 2 warnings, 0 errors
|
||||
linking...
|
||||
Program Size: Code=13620 RO-data=1132 RW-data=128 ZI-data=2200
|
||||
FromELF: creating hex file...
|
||||
"apple_all\apple_all.axf" - 0 Error(s), 2 Warning(s).
|
||||
"apple_all\apple_all.axf" - 0 Error(s), 0 Warning(s).
|
||||
|
||||
<h2>Software Packages used:</h2>
|
||||
|
||||
@@ -59,7 +50,7 @@ Package Vendor: Keil
|
||||
<h2>Collection of Component Files used:</h2>
|
||||
|
||||
* Component: ARM::CMSIS:CORE:5.3.0
|
||||
Build Time Elapsed: 00:00:01
|
||||
Build Time Elapsed: 00:00:00
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -240,7 +240,7 @@ I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_uart_ex.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_gpio_ex.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_dma_ex.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_cortex.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_flash_ex.h)(0x5DFA0893)
|
||||
I (../Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_i2c.h)(0x5DFA0893)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -73,10 +73,20 @@ UART_HandleTypeDef huart1;
|
||||
/* USER CODE BEGIN PV */
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
0.0.1
|
||||
working beta
|
||||
|
||||
0.1.0
|
||||
20230416
|
||||
initial release
|
||||
added watchdog timer
|
||||
*/
|
||||
|
||||
const uint8_t board_id = 3;
|
||||
const uint8_t version_major = 0;
|
||||
const uint8_t version_minor = 0;
|
||||
const uint8_t version_patch = 1;
|
||||
const uint8_t version_minor = 1;
|
||||
const uint8_t version_patch = 0;
|
||||
uint8_t hw_revision = 0;
|
||||
|
||||
uint8_t spi_transmit_buf[SPI_BUF_SIZE];
|
||||
@@ -263,7 +273,7 @@ void HAL_SPI_TxRxCpltCallback(SPI_HandleTypeDef *hspi)
|
||||
ACT_LED_off_ts = micros() + 10000;
|
||||
}
|
||||
|
||||
const char boot_message[] = "USB4VC Protocol Board\nApple Pre-USB\ndekuNukem 2022";
|
||||
const char boot_message[] = "USB4VC Protocol Card\nApple Lisa, Mac, and ADB\ndekuNukem 2023";
|
||||
|
||||
/*
|
||||
|
||||
@@ -615,9 +625,10 @@ int main(void)
|
||||
MX_TIM16_Init();
|
||||
MX_TIM17_Init();
|
||||
MX_TIM14_Init();
|
||||
// MX_IWDG_Init();
|
||||
MX_IWDG_Init();
|
||||
/* USER CODE BEGIN 2 */
|
||||
// HAL_IWDG_Refresh(&hiwdg);
|
||||
HAL_GPIO_WritePin(ERR_LED_GPIO_Port, ERR_LED_Pin, GPIO_PIN_SET);
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
printf("%s\nrev%d v%d.%d.%d\n", boot_message, hw_revision, version_major, version_minor, version_patch);
|
||||
delay_us_init(&htim2);
|
||||
protocol_status_lookup_init();
|
||||
@@ -640,9 +651,10 @@ int main(void)
|
||||
|
||||
/* Infinite loop */
|
||||
/* USER CODE BEGIN WHILE */
|
||||
|
||||
HAL_GPIO_WritePin(ERR_LED_GPIO_Port, ERR_LED_Pin, GPIO_PIN_RESET);
|
||||
while (1)
|
||||
{
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
HAL_GPIO_WritePin(ERR_LED_GPIO_Port, ERR_LED_Pin, spi_error_occured);
|
||||
if(micros() > ACT_LED_off_ts)
|
||||
HAL_GPIO_WritePin(ACT_LED_GPIO_Port, ACT_LED_Pin, GPIO_PIN_RESET);
|
||||
@@ -717,7 +729,7 @@ static void MX_IWDG_Init(void)
|
||||
{
|
||||
|
||||
hiwdg.Instance = IWDG;
|
||||
hiwdg.Init.Prescaler = IWDG_PRESCALER_16;
|
||||
hiwdg.Init.Prescaler = IWDG_PRESCALER_32;
|
||||
hiwdg.Init.Window = 4095;
|
||||
hiwdg.Init.Reload = 4095;
|
||||
if (HAL_IWDG_Init(&hiwdg) != HAL_OK)
|
||||
|
||||
BIN
firmware/releases/PBFW_LISA_MAC_ADB_PBID3_V0_1_0.dfu
Normal file
BIN
firmware/releases/PBFW_LISA_MAC_ADB_PBID3_V0_1_0.dfu
Normal file
Binary file not shown.
@@ -72,6 +72,12 @@
|
||||
|
||||
## Apple Desktop Bus (ADB) Protocol Card
|
||||
|
||||
### 0.3.0
|
||||
|
||||
* 7 March 2023
|
||||
|
||||
* Added support for BUSY signal
|
||||
|
||||
### 0.2.1
|
||||
|
||||
* Released 20 May 2022
|
||||
|
||||
@@ -106,7 +106,7 @@ def get_firmware_list(pcard_id):
|
||||
try:
|
||||
file_list = json.loads(urllib.request.urlopen(firmware_url).read())
|
||||
fw_list = [x['name'] for x in file_list if 'name' in x and 'type' in x and x['type'] == 'file']
|
||||
fw_list = [d for d in fw_list if d.startswith('PBFW') and d.lower() and f"PBID{pcard_id}" in d]
|
||||
fw_list = [d for d in fw_list if d.startswith('PBFW') and f"PBID{pcard_id}" in d]
|
||||
fw_list.sort(key=lambda s: list(map(int, s.lower().split('_v')[1].split('.')[0].replace('_', '.').split('.'))), reverse=True)
|
||||
except Exception as e:
|
||||
print('get_firmware_list:', e)
|
||||
|
||||
Reference in New Issue
Block a user