-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOTES.txt
102 lines (76 loc) · 3.77 KB
/
NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
Microbian port to XIAO nRF52840 with tinyusb cdc
================================================
BRANCH: xiao-nrf52-tinyusb-cdc
install tinyusb repo and patches with:
cd baremetal/baremetal-v2-xiao-nrf52/setup-tinyusb/
install-tinyusb-cdc-lib.a.sh
tinyusb will be parallel with baremetal-v2-xiao-nrf2
I've been working on the cheaper Seeed Studio XIAO nRF52840 without
IMU and mic. The expansion board has SWD and an easier to use reset button.
Seeed Studio XIAO nRF52840 (Sense)
https://wiki.seeedstudio.com/XIAO_BLE/ has an IMU and microphone
Using Seeed XIAO Expansion board
https://wiki.seeedstudio.com/Seeeduino-XIAO-Expansion-Board/
There is also a SAMD21 version https://wiki.seeedstudio.com/Seeeduino-XIAO/
which can be bought with headers pre-soldered.
It lacks a reset button so the expansion board is pretty much required
although pads are exposed for shorting reset in place of a button.
I thought it was of interest because of my unfinished Adafruit trinket USB
microbian port which could benefit from a better approach to adding cdc.
Project folders I remember touching or have started.
====================================================
x19b-buzzer
x20-radio - bytes are rx'd and tx'd but it's not fluid, not fully investigated
x31-adc-battery - hang over from earlier hacking, need fix blocking
x40-i2crtc - need to clean up api rapid conversion from c++ with search and replace
x41-tinyusb-prep pre usb-startup.o
x42b-fromx41 pre usb-startup.o
x42c-usbserial-driver - "minicom -D /dev/ttyACM1" cat file.txt > /dev/ttyACM1
x42-testwithout-tinyusb - checking for stability since getting hardfaults
x43-timerbug - checking for hardfaults, don't have a DAPLINK yet
x44-oled - I2C oled driver outside of microbian
x45-pingpong - oled bouncing ball with buzzer on rebound
TODO:
tinyusb-cdc-lib.a needs a clean
Would blocking usbserial rx be desirable? Currently returns (int)-1
for not available. Would fprintf be a good idea?
investigate radio - have not read datasheet for differences if any from UBITv2
Drivers to make:
PWM
SPIM on SPI2
SPIM on SPI2 with DMA
QSPI with DMA
microphone (Sense)
IMU (Sense)
Probably never:
SOFTDEVICE would require usb priority going back down from 0 to 2 and
adding semaphore primitive to support that if i've understood things correctly.
I'm getting away with -DCFG_TUSB_OS=OPT_OS_NONE and using NVIC priority 0
for USB.
Programming
===========
I've not tried the UF2 interface.
For DFU serial. Install Adafruit_nRF52_nrfutil
https://github.com/adafruit/Adafruit_nRF52_nrfutil
or pip3 install --user adafruit-nrfutil
I used the toolchain that came with Arduino 1.8.19
Navigate to File > Preferences, and fill "Additional Boards Manager URLs" with
the url below:
https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json
Then Navigate to Tools > Board > Boards Manager...,
type the keyword "seeed nrf52" in the search box,
select the latest version of the board you want, and install it.
You can install both. The mbed one is much more mature.
Used Seeed arduino ide and board package for hints and the tools chain.
Right now my microbian port is a bit untity but it works.
It's untidier than it should be because of getting tinyusb-cdc-lib.a going,
but not polished.
NOTICED THAT COLD PLUG OF USB WITH USB STACK on x46 but also x42c lead to a
crash on startup so need to investigate. Is OK with a reset once plugged in.
So rationalised usb projects too soon, need to go back and cherry-pick and look
for crash.
Built x44-oled again at this level as it has no USB code and it cold boots ok.
Brought back x41 and modernised, tests OK.
Post investigation, fixed crash, but fix causes occasional stall of minicom
on /dev/ttyACM1 close, was not an issue pre fix as far as I remember.
Just indicates that I have to learn the tinyusb API properly.