Dumping security registers of MD-UV380
This commit is contained in:
parent
32ccd29c5c
commit
8ddebef197
|
|
@ -11,7 +11,7 @@ project('OpenRTX', 'c',
|
|||
|
||||
## OpenRTX
|
||||
|
||||
openrtx_src = ['openrtx/src/main.c',
|
||||
openrtx_src = ['tests/platform/printCalib_MDUV380.c',
|
||||
'openrtx/src/bootstrap.c',
|
||||
'openrtx/src/state.c',
|
||||
'openrtx/src/ui.c',
|
||||
|
|
@ -20,6 +20,7 @@ openrtx_src = ['openrtx/src/main.c',
|
|||
openrtx_inc = ['openrtx/include/interfaces',
|
||||
'openrtx/include',
|
||||
'platform/drivers/ADC',
|
||||
'platform/drivers/NVM',
|
||||
'platform/drivers/tones',
|
||||
'openrtx/include/fonts/adafruit']
|
||||
|
||||
|
|
@ -161,6 +162,7 @@ md390_def = def + stm32f405_def
|
|||
## TYT MD-UV380
|
||||
mduv380_src = src + stm32f405_src + ['platform/drivers/display/HX83XX_MDx.c',
|
||||
'platform/drivers/keyboard/keyboard_MDx.c',
|
||||
'platform/drivers/NVM/extFlash_MDx.c',
|
||||
'platform/drivers/ADC/ADC1_MDx.c',
|
||||
'platform/targets/MD-UV380/platform.c',
|
||||
'openrtx/src/graphics/graphics_rgb565.c']
|
||||
|
|
|
|||
|
|
@ -72,6 +72,12 @@
|
|||
#define MONI_SW LCD_D6
|
||||
#define FUNC_SW LCD_D7
|
||||
|
||||
/* External flash */
|
||||
#define FLASH_CS GPIOD,7
|
||||
#define FLASH_CLK GPIOB,3
|
||||
#define FLASH_SDO GPIOB,4
|
||||
#define FLASH_SDI GPIOB,5
|
||||
|
||||
/*
|
||||
* To enable pwm for display backlight dimming uncomment this directive.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include "extFlash_MDx.h"
|
||||
|
||||
int main()
|
||||
{
|
||||
extFlash_init();
|
||||
extFlash_wakeup();
|
||||
|
||||
while(1)
|
||||
{
|
||||
getchar();
|
||||
|
||||
uint8_t buf[16];
|
||||
uint32_t addr = 0x1000;
|
||||
for(; addr < 0x1100; addr += sizeof(buf))
|
||||
{
|
||||
(void) extFlash_readSecurityRegister(addr, buf, sizeof(buf));
|
||||
printf("\r\n%lx: ", addr);
|
||||
for(unsigned int i = 0; i < sizeof(buf); i++) printf("%03d ", buf[i]);
|
||||
}
|
||||
|
||||
puts("\r");
|
||||
|
||||
for(addr = 0x2000; addr < 0x2100; addr += sizeof(buf))
|
||||
{
|
||||
(void) extFlash_readSecurityRegister(addr, buf, sizeof(buf));
|
||||
printf("\r\n%lx: ", addr);
|
||||
for(unsigned int i = 0; i < sizeof(buf); i++) printf("%03d ", buf[i]);
|
||||
}
|
||||
|
||||
puts("\r");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Reference in New Issue