Skip to content

Instantly share code, notes, and snippets.

Avatar

roland rolandvs

View GitHub Profile
@rolandvs
rolandvs / gist:beb160a9dcd7317966b72bea0e82c4c9
Created Dec 27, 2019
Collecting interesting repositories and tutorials
View gist:beb160a9dcd7317966b72bea0e82c4c9
Use of jupyter, docker and a few more to go beyond static gui display ...
https://github.com/jgoerner/beyond-jupyter
@rolandvs
rolandvs / uping.py
Created Dec 11, 2019 — forked from shawwwn/uping.py
µPing: Ping library for MicroPython
View uping.py
# µPing (MicroPing) for MicroPython
# copyright (c) 2018 Shawwwn <shawwwn1@gmail.com>
# License: MIT
# Internet Checksum Algorithm
# Author: Olav Morken
# https://github.com/olavmrk/python-ping/blob/master/ping.py
# @data: bytes
def checksum(data):
if len(data) & 0x1: # Odd number of bytes
@rolandvs
rolandvs / NUCLEO-F091RC_UART_CONNECTION.txt
Last active Sep 10, 2019
NUCLEO-F091RC rearranging the UART's
View NUCLEO-F091RC_UART_CONNECTION.txt
# NUCLEO_STMF091RC
The NUCLEO boards have `ST-morpho` connectors and the `Arduino` connectors so anyone can hook up his/her favourite interfaces.
Please refer to document: [UM1724](https://www.st.com/content/ccc/resource/technical/document/user_manual/98/2e/fa/4b/e0/82/43/b7/DM00105823.pdf/files/DM00105823.pdf/jcr:content/translations/en.DM00105823.pdf)
## Arduino Serial Port
If one would like to use the Arduino connector to connect to a shield, you will run into trouble when the serial interface needs to be used.
The `NUCLEO_F091RC` PCB is not completely configured to work using the standard serial port; the `D0/D1` pins that refer to `PA3/PA2` for UART communication are simply **NOT** connected!
@rolandvs
rolandvs / board_init.c
Created Aug 16, 2019
Micropython with STM32(F091) MCU - Setting the MCO output
View board_init.c
#include STM32_HAL_H
#include "mpconfigboard.h"
void STM32F091RC_board_early_init(void) {
#if defined(MICROPY_HW_MCO)
/* redirect to: source RCC_MCOSource: prescaler RCC_MCODiv:
* RCC_MCO1: PA8 RCC_MCO1SOURCE_HSI RCC_MCODIV_1
* RCC_MCO2: PC9 RCC_MCO1SOURCE_LSE RCC_MCODIV_2
* RCC_MCO1SOURCE_HSE RCC_MCODIV_3
* RCC_MCO1SOURCE_PLLCLK RCC_MCODIV_4