-
debugging works?
12/28/2022 at 01:53 • 0 commentsWelp, after ordering the debug adapter, loosing it, ordering it again and then finally getting everything soldered up, it looks like everything was correct? Maybe I have a loose wire (or a screw loose) but I now have the JLink working with my Sensorwatch and I can flash code and use breakpoints
Now I just need to learn enough GDB or ARM stuff to get sensor data out... I started looking into semihosting (where the MCU can read/write files on the host computer) but it looks like I need to use OpenOCD and add code and and and my eyes started glazing over which indicated I should take a break and try again tomorrow
But my next avenues for investigation:
- look into openocd vs JLink GDB (probably just stick with JLinkGDB since it works and I'm not encumbered by ideology or lawyers so I can do what I want)
- look into semihosting a bit deeper
- look into GDB scripting, maybe I can just make a script that sets a breakpoint, dumps some memory to a file and then continues
-
debugging rabbit hole
11/02/2022 at 01:08 • 0 commentsGoing down a bit of a rabbit hole at the moment and trying to get the SWD pins broken out of the SensorWatch 'In system' (aka with the watch assembled). I need that so I can have a faster iteration cycle and so that I can start logging some data while the sensor is in it's natural environment
I have some very fine gauge wire attached to the pads and broken out. Those wires are also attached to a 10-pin debug connector and to a J-Link mini, but it's not working properly... I suspect some mis-wiring on my part but it's hard to check connections with such tiny wires and connectors. To fix that, I've ordered a breakout board
-
State of the Sensor
09/16/2022 at 00:14 • 0 commentsSo here's where things stand at the moment.
The flex PCB works and I can communicate to the SI1133 from the Sensorwatch. UV light does make it through the LCD and plastic to the insides of the watch. I have a working 'movement' watchface to show a raw ADC count of UV light
But there are a few things that don't work or that I don't understand.
1. Interrupts don't work. I suspect this might be a problem with how the sensorwatch runs when it's plugged in via USB (faster clock, no sleeping), although I haven't tried since I switched from a 'raw' app to a movement face2. The code doesn't handle when the sensor overflows/saturates
3. The SI1133 has a few different filters/mode, and I don't really understand the difference between UV and UV-Deep (or the IR / Visible modes but I care less about that). Posted on the SI forums for an answer
4. There's still no code for calculating UV index because I don't yet have a method for correlating raw ADC counts (at whatever gain settings!) with actual UV hitting the watch (in Lux?) or with the actual UV Index
5. I don't have a good feedback loop, it's a pain to open the watch up every time I flash new code. I think I want to solder some wires to my spare SensorWatch and hook it up to a programmer while it's still inside the watch body