Skip to content

Instantly share code, notes, and snippets.

View rolandvs's full-sized avatar
💭
soldering, coding, debugging, coffee, repeat

roland rolandvs

💭
soldering, coding, debugging, coffee, repeat
View GitHub Profile
@rolandvs
rolandvs / board_init.c
Created August 16, 2019 08:49
Micropython with STM32(F091) MCU - Setting the MCO output
#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
@rolandvs
rolandvs / NUCLEO-F091RC_UART_CONNECTION.txt
Last active September 10, 2019 15:01
NUCLEO-F091RC rearranging the UART's
# 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 / uping.py
Created December 11, 2019 11:30 — forked from shawwwn/uping.py
µPing: Ping library for MicroPython
# µ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 / gist:beb160a9dcd7317966b72bea0e82c4c9
Created December 27, 2019 09:53
Collecting interesting repositories and tutorials
Use of jupyter, docker and a few more to go beyond static gui display ...
https://github.com/jgoerner/beyond-jupyter