nRF microbit (nRF51822) issues
I've built the ports/nrf for microbit with default configuration :
[nrf]$ make BOARD=microbit clean
[nrf]$ make -j8 BOARD=microbit
and using $ screen /dev/ttyACM0 115200 to access REPL, but have some issues :
- file system microbitfs is not accessible via
ufsor Mu Editor. How to externally acess the internal file system ? With official MicroPython for BBC micro:bit ufs and Mu Editor can access the files; Ctrl+din REPL freezes, as well asmachine.soft_reset();deepsleep()andlightsleep()don't work. It seems that__WFIand__WFEare not working on microbit/nRF51822;- unstable I2C scan reading.
And building with Bluetooth :
[nrf]$ make BOARD=microbit clean
[nrf]$ make -j8 BOARD=microbit SD=s110
then REPL is not accessible at all via $ screen /dev/ttyACM0 115200.
Not issues, but features lacking with respect to official MicroPython for BBC Micro:bit :
- no float numbers and math module, but it is possible to enable, see my commit "nrf : nRF51 with float enabled" in my branch;
- module 'microbit' :
- no
button_a.*/button_b.*; - no
display.read_light_level(); - no
accelerometer.*; - no
compass.*.
- no
About the buttons A and B, it is simple to read via machine.Pin :
from machine import Pin
button_a = Pin(Pin.cpu.P17, Pin.IN, Pin.PULL_UP)
button_b = Pin(Pin.cpu.P26, Pin.IN, Pin.PULL_UP)
button_a.value() # button A not pressed
1
button_a.value() # button A pressed
0
NRF51822 (PCA10028) - no serial console after flashing
Building the pca10028 target:
cd ports/nrf
make BOARD=pca10028
Flashing it with OpenOCD:
openocd -f interface/stlink-v2.cfg -f target/nrf51.cfg -c "program ./build-pca10028/firmware.bin verify reset exit"
And trying to connect to the serial port:
screen /dev/ttyUSB0 115200
Serial console is blank though and resetting the board does not do anything. I've verified that the MICROPY_HW_UART1_RX and MICROPY_HW_UART1_TX pins in boards/pca10028/mpconfigboard.h are correct and I've tried disabling MICROPY_HW_UART1_HWFC as well. No dice.
Any ideas?