nothing but issues

This commit is contained in:
Robin Müller 2024-06-11 23:26:32 +02:00
parent fbad23b9ad
commit 841b8e1273
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 7 additions and 24 deletions

View File

@ -14,30 +14,13 @@ Purpose : J-Link target setup file for VORAGO VA416xx
---------------------------END-OF-HEADER------------------------------
*/
int DisableRomProt(void) {
JLINK_SYS_Report("VA416XX: Disabling ROM protection");
return JLINK_MEM_WriteU32(0x40010010, 0x1); // ROM_PROT = 0x1
}
int DisableWatchdog(void) {
JLINK_MEM_WriteU32(0x400210C0, 0x1ACCE551); // WDOGLOCK = 0x1ACCE551
JLINK_MEM_WriteU32(0x40021008, 0x0); // WDOGCONTROL = 0x0 (diable)
}
int SetupTarget (void) {
JLINK_SYS_Report("SetupTarget()");
return DisableRomProt(); // ROM_PROT = 0x1
}
/*********************************************************************
*
* AfterResetTarget
*/
int AfterResetTarget (void) {
JLINK_SYS_Report("AfterResetTarget()");
// disable watchdog and unlock code RAM for write
DisableWatchdog();
return DisableRomProt(); // ROM_PROT = 0x1
return JLINK_MEM_WriteU32(0x40010010, 0x1); // ROM_PROT = 0x1
}
/*********************************************************************
@ -46,7 +29,7 @@ int AfterResetTarget (void) {
*/
int BeforeTargetDownload (void) {
JLINK_SYS_Report("BeforeTargetDownload()");
return DisableRomProt(); // ROM_PROT = 0x1
return JLINK_MEM_WriteU32(0x40010010, 0x1); // ROM_PROT = 0x1
}
/*********************************************************************
@ -55,7 +38,7 @@ int BeforeTargetDownload (void) {
*/
int AfterTargetDownload (void) {
JLINK_SYS_Report("AfterTargetDownload()");
return DisableRomProt(); // ROM_PROT = 0x0
return JLINK_MEM_WriteU32(0x40010010, 0x0); // ROM_PROT = 0x0
}
/*********************************************************************
@ -64,7 +47,7 @@ int AfterTargetDownload (void) {
*/
int HandleBeforeFlashProg(void) {
JLINK_SYS_Report("HandleBeforeFlashProg()");
return DisableRomProt(); // ROM_PROT = 0x1
return JLINK_MEM_WriteU32(0x40010010, 0x1); // ROM_PROT = 0x1
}
/*********************************************************************
@ -73,5 +56,5 @@ int HandleBeforeFlashProg(void) {
*/
int HandleAfterFlashProg(void) {
JLINK_SYS_Report("HandleAfterFlashProg()");
return DisableRomProt(); // ROM_PROT = 0x0
return JLINK_MEM_WriteU32(0x40010010, 0x0); // ROM_PROT = 0x0
}

View File

@ -34,8 +34,8 @@ variants:
- main
flash_algorithms:
- va416_spi_fram_256kb
- va416_ebiboot_fram_256kb
- va416_ebi_fram_512kb
# - va416_ebiboot_fram_256kb
# - va416_ebi_fram_512kb
flash_algorithms:
- name: va416_spi_fram_256kb
description: VA416_SPI_FRAM_256KB