aboutsummaryrefslogtreecommitdiff
path: root/example-fs-bb48/ABOUT-SYS
diff options
context:
space:
mode:
Diffstat (limited to 'example-fs-bb48/ABOUT-SYS')
-rw-r--r--example-fs-bb48/ABOUT-SYS79
1 files changed, 74 insertions, 5 deletions
diff --git a/example-fs-bb48/ABOUT-SYS b/example-fs-bb48/ABOUT-SYS
index d3c79b0..15fb61c 100644
--- a/example-fs-bb48/ABOUT-SYS
+++ b/example-fs-bb48/ABOUT-SYS
@@ -1,6 +1,10 @@
Consideration about SYS and the first pages of flash ROM
========================================================
+Now, I'm developing something like SYS for Kinetis L MCU, so, I write
+this document.
+
+
About SYS on STM32F103
======================
@@ -15,10 +19,6 @@ STM32F030, as well as STM32F103. But, it wouldn't be useful for
STM32F030. In fact, the file example-fsm-55/sys.c has name sys.c
but it doesn't include any system routines.
-Now, I'm developing something like SYS for Kinetis L MCU, so, I write
-this document.
-
-
The original issue was:
(1) When it's protected, STM32F103 can't change the first 4KiB of
@@ -77,7 +77,7 @@ and here is the list of all.
* flash ROM access routines
unlock
- write word
+ write halfword
erase page
brank check
write page
@@ -114,6 +114,75 @@ For Kinetis L, because it's ROM has the original firmware upgrade
support by the vendor (though USB HID), all that we needed for
firmware upgrade would be just erasing to factory settings.
+And it has no limitation like STM32F103's first 4KiB flash ROM.
+All pages can be updated at run time.
+
+Nevertheless, the first two pages (2KiB) of KL27Z is still difficult
+to use.
+
+So, I decide to introduce something like SYS for Kinetis L.
+
+
+* Layout
+
+Three pages (3KiB) usage:
+
+ ------------ The first page
+ End of RAM <-- not used but hardware define this
+ Address of reset entry
+ sys_version
+ sys_board_info (id, name)
+ sys_vector
+
+
+ SYS...
+
+ ------------ The second page
+ FLASH CONFIG: 16-byte
+ Reset entry function
+ CRC-32 routine
+ CRC-32 table (768-byte of CRC-32 table)
+
+ ------------ The third page
+ MAGIC 256-byte (256-byte of the last part of CRC-32 table)
+ ...
+ vectors (MSP, reset, ...)
+ ...
+
+
+* data: Board identification
+
+ sys_version
+ sys_board_id
+ sys_board_name ; null terminated
+
+* Board specific routines
+
+ * mcu/board lower level
+ clock_init
+ gpio_init
+
+ * led
+ set_led
+
+* data: Board independent routines
+
+ * flash ROM access code to be loaded on to RAM
+
+* system reset routine???
+
+ nvic_system_reset
+
+
+* data: vectors for routines and data
+ sys_version
+ sys_board_id
+ address of set_led
+ address of clock_init
+ address of gpio_init
+ address of sys_board_name
+ address of ...
+
--