mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-11-10 17:49:32 +08:00
Remove 512k support, fix flash waitstates
512k chip support isn't complete anyway and the incorrect clock would've ended up destroying Flash anyway. The 256k waitstates were set to 0, which is outside the spec. Set them to 1, which is allowed.
This commit is contained in:
parent
928727a45b
commit
24b182d01b
1 changed files with 3 additions and 13 deletions
|
@ -256,19 +256,9 @@ void BootROM(void)
|
|||
LED_B_OFF();
|
||||
LED_A_OFF();
|
||||
|
||||
// if 512K FLASH part - TODO make some defines :)
|
||||
if ((AT91C_BASE_DBGU->DBGU_CIDR & 0xf00) == 0xa00) {
|
||||
AT91C_BASE_EFC0->EFC_FMR =
|
||||
MC_FLASH_MODE_FLASH_WAIT_STATES(1) |
|
||||
MC_FLASH_MODE_MASTER_CLK_IN_MHZ(0x48);
|
||||
AT91C_BASE_EFC1->EFC_FMR =
|
||||
MC_FLASH_MODE_FLASH_WAIT_STATES(1) |
|
||||
MC_FLASH_MODE_MASTER_CLK_IN_MHZ(0x48);
|
||||
} else {
|
||||
AT91C_BASE_EFC0->EFC_FMR =
|
||||
MC_FLASH_MODE_FLASH_WAIT_STATES(0) |
|
||||
MC_FLASH_MODE_MASTER_CLK_IN_MHZ(48);
|
||||
}
|
||||
AT91C_BASE_EFC0->EFC_FMR =
|
||||
MC_FLASH_MODE_FLASH_WAIT_STATES(1) |
|
||||
MC_FLASH_MODE_MASTER_CLK_IN_MHZ(48);
|
||||
|
||||
// Initialize all system clocks
|
||||
ConfigClocks();
|
||||
|
|
Loading…
Reference in a new issue