You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The micro:bit contains two microcontrollers, the Interface MCU which provides the USB functionality, and the Target MCU where the user code runs.
29
+
More information can be found in the [Tech Site DAPLink page](https://tech.microbit.org/software/daplink-interface/).
30
+
31
+
In micro:bit V1 there are UART and SWD signals connecting the Interface MCU (KL26) and the Target MCU (nRF51). These are used to program the Target MCU (nRF51) and to provide serial communication between the Target (nRF51) and the computer.
32
+
33
+
The micro:bit V2 adds an internal I2C bus connected to the Interface MCU (KL27), the Target MCU (nRF52), and the motion sensors (in V1 the motions sensors are connected to the external I2C bus, connected only to the Target MCU (nRF51), more info in the [Tech Site I2C page](https://tech.microbit.org/hardware/i2c-shared/)).
34
+
This new I2C bus allows the Interface (KL27) to provide additional features to the Target (nRF52), and to co-operate to set the board into different power modes (more info in the [Power Management Spec](https://github.com/microbit-foundation/spec-power-management/)).
35
+
36
+

37
+
38
+
The additional features provided by the Interface (KL27) via I2C are:
39
+
- Device Information
40
+
- Board ID, DAPLink version, and more
41
+
- Power Management
42
+
- As defined in the [Power Management Spec](https://github.com/microbit-foundation/spec-power-management/)
43
+
- I2C Flash Storage
44
+
- The Interface (KL27) flash is 256 KBs, where 128KBs are reserved for non-volatile storage accessible to the Target (nRF52)
-`read_request` can only be sent by the I2C master (nrf)
194
-
- The master (nRF) must wait for the `COMBINED_SENSOR_INT` signal to be asserted by the slave (KL27)
195
-
-`write_request` can be sent by both slave and master.
196
-
- For the slave to initiate this, it must assert the interrupt signal first and then the master must poll (i2c read) the device for data.
223
+
-`read_request` can only be sent by the I2C main (nrf)
224
+
- The main (nRF) must wait for the `COMBINED_SENSOR_INT` signal to be asserted by the secondary (KL27)
225
+
-`write_request` can be sent by both secondary and main.
226
+
- For the secondary to initiate this, it must assert the interrupt signal first and then the main must poll (i2c read) the device for data.
197
227
198
228
199
229
## I2C Flash interface
@@ -252,9 +282,9 @@ KL27 storage memory layout:
252
282
### Flash Operations
253
283
254
284
#### Reading/writing config data
255
-
- For writing the config data (file name, file size and file visibility), the I2C Master has to send the 1B command ID followed by the corresponding config data. If the data size is unexpected, an error will be returned in the I2C response.
256
-
- The I2C Response after a sucessful write opeartion will contain the corresponding command ID followed by the written config data which can be used as confirmation by the I2C master.
257
-
- For reading the config data, the I2C Master has to send only the 1B command ID with no further data. The I2C response will then contain the config data.
285
+
- For writing the config data (file name, file size and file visibility), the I2C main has to send the 1B command ID followed by the corresponding config data. If the data size is unexpected, an error will be returned in the I2C response.
286
+
- The I2C Response after a successful write operation will contain the corresponding command ID followed by the written config data which can be used as confirmation by the I2C main.
287
+
- For reading the config data, the I2C main has to send only the 1B command ID with no further data. The I2C response will then contain the config data.
258
288
259
289
#### Write storage data
260
290
@@ -297,8 +327,8 @@ KL27 storage memory layout:
297
327
- KL27 I2C buffer size: 1KB + 4 bytes
298
328
- Storage writes should not trigger "hidden" sector erases, the nRF is
299
329
responsible to write and erase
300
-
- When writting to the config data first check if the data to be written is
301
-
different than present, avoid an erase-and-write opertion if it's the same
330
+
- When writing to the config data first check if the data to be written is
331
+
different than present, avoid an erase-and-write operation if it's the same
302
332
- USB should have higher priority than any I2C transaction
303
333
304
334
### Examples
@@ -346,7 +376,7 @@ KL27 storage memory layout:
346
376
347
377
### Universal Hex
348
378
349
-
KL27 storage area should be writable via Universal Hex.
379
+
KL27 storage area should be writeable via Universal Hex.
0 commit comments