The approach I took was a mixed signal one where a capable analog front end would be paired up with a beefy DSP processor to compute the Impedance. Most importantly, in this scheme, the DSP is responsible for discriminating the phase between the sampled voltage and current waveforms; this approach is preferred because it leads to good accuracy and calibration stability.
Murata produces LoRa module CMWX1ZZABZ-xxx based on SX1276 transceiver and STM32L072CZ microcontroller. The soldering of the LGA module is not very hobby-friendly. I constructed small breakout PCB for this module with additional buck/boost switcher and place for SMA connector. The transceiver features the LoRa®long-range modem, providing ultra-long-range spread spectrum communication and high interference immunity, minimizing current consumption. Since CMWX1ZZABZ-091 is an “open” module, it is possible to access all STM32L072 peripherals such as ADC, 16-bit timer, LP-UART, I2C, SPI and USB 2.0 FS (supporting BCD and LPM), which are not used internally by SX1276.
The defacto ‘hello world’ for microcontrollers is blink a LED at a steady rate. This is exactly what I’m going to do today. I made a small 5×5 development board, soldered it up and started programming. In this first example we not gonna use fancy IRQs or timers to blink at a steady rate, but we insert NOPsas delay. This would give an idea of the RAW performance of the chip. The used code is simple; set up the maximum available clock available and then toggle RA0 for ever.
Sjaak wrote about a Chinese ARM chip compared to a ST ARM chip:
Most of us do know the ST line of ARM chips called STM32. They come in multiple flavours and the STM32F103 is one of the most common entry level family of chips. They are called by ST as mainstream. They are a full featured 32 bit ARM Cortex M3 chip running at max. 72MHz with all the requisite peripherals like ADC, DAC, USB, CAN, I2C, I2S, SPI, SDIO, PWM, RTC, interrupts and various timers. Lets zoom into the STM32F103C8 chip (which seems the be the go-to choice of the Chinese el-cheapo development breakout boards)
It has been a while since I wrote about ARM development. I recently made a Black Magic Probe (BMP) clone which acts different then the original. The BMP can source power to the target, but on my version control signal is inverted. Not a big deal, but can give unintentional results and has to be fixed. Just for my own memory I wrote down all the steps involved in setting it up and shared it in order to be useful for others.
Writing a portable code is one of the concerns for developers, and while dealing with bit-fields is not standard in all compilers, it is not very advisable to use.
When a feature is available in the hardware itself, you will not have any issues in porting the code from vendor to vendor while both are using the same ARM Cortex-M3 core.
ARM Cortex-M3 features a 1 MB area in SRAM memory called bit-band region. In this region each bit can be accessed individually. To access to bit-band region bits you need to do so via an aliased region, where each word in this region is an alias to one bit in the bit-band region.