Add connecting MCU to JTAG support for GW1NSR-4C

This commit is contained in:
balika011
2022-07-20 23:32:21 +02:00
parent 0581803def
commit e847c3a7b0
4 changed files with 22 additions and 1 deletions
+7
View File
@@ -58,6 +58,7 @@ using namespace std;
# define STATUS_FLASH_LOCK (1 << 17)
#define EF_PROGRAM 0x71
#define EFLASH_ERASE 0x75
#define SWITCH_TO_MCU_JTAG 0x7a
/* BSCAN spi (external flash) (see below for details) */
/* most common pins def */
@@ -576,6 +577,12 @@ bool Gowin::flashFLASH(uint32_t page, uint8_t *data, int length)
return true;
}
bool Gowin::connectJtagToMCU()
{
wr_rd(SWITCH_TO_MCU_JTAG, NULL, 0, NULL, 0);
return true;
}
/* TN653 p. 9 */
bool Gowin::flashSRAM(uint8_t *data, int length)
{