Git Product home page Git Product logo

Comments (9)

proppy avatar proppy commented on July 21, 2024 1

@thesourcerer8 commented about getting uart to work here:
https://github.com/thesourcerer8/mpw2-stdcell-tests/blob/main/uart_test/uart_test.c

from caravel_board.

proppy avatar proppy commented on July 21, 2024 1

@abdullahyildiz I think they are electrically connected, UART is on E7 and F7, respectively mapped to mprj_io[5] and mprj_io[6] which onnect to CN11 PF0 and CN12 PE11 of the nucleo Morpho connector:
Screenshot_20230316-182716~3
but don't seem to be currently surfaced in the micropython HAL UART definitions.

from caravel_board.

proppy avatar proppy commented on July 21, 2024 1

found out that we can actually bridge one of the existing UART port defined here:
https://github.com/micropython/micropython/blob/master/ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.h#L38-L39

by setting the pin #9 to C_DISABLE in gpio_config_io.py and leaving its register untouched in set_registers and then physically bridging IO[9] (which correspond to MICROPY_HW_UART6_RX (G9) with IO[6] using a jumper cable:
IMG_20230317_182548

The data from the caravel serial port can then be read from the micropython environment using:

uart = machine.UART(6, 9600)
print(uart.read())

from caravel_board.

abdullahyildiz avatar abdullahyildiz commented on July 21, 2024

There is also no register defined for setting the UART baud rate (i.e., divisor) in csr.h. Is it included as a register field in one of the other CSRs?

from caravel_board.

proppy avatar proppy commented on July 21, 2024

but it would be nice to also have the caravel UART defined in the nucleo micropython machine environment, currently it returns:

uart = UART(0, 9600)                         # init with given baudrate

from machine import UART
​
uart = UART(0, 9600)                         # init with given baudrate
uart.init(9600, bits=8, parity=None, stop=1) # init with given parameters
uart.read()

Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
ValueError: UART(0) doesn't exist

from caravel_board.

proppy avatar proppy commented on July 21, 2024

it particular it seems that UART8 (which correspond to https://caravel-harness.readthedocs.io/en/latest/uart.html) is not plugged into the default nucleo HAL:
https://github.com/micropython/micropython/blob/05bb26010e4a466a82cfed179f8d8d0b406a78ca/ports/stm32/boards/NUCLEO_F746ZG/mpconfigboard.h#L32-L39

from caravel_board.

abdullahyildiz avatar abdullahyildiz commented on July 21, 2024

@proppy,

As far as I know, MicroPython is a software stack which runs on Nucleo board and UART peripheral on Caravel management SoC is not controlled by MicroPython.

from caravel_board.

proppy avatar proppy commented on July 21, 2024

@abdullahyildiz yep, but the hardware pin that export the hardware bus are physically connected to the Nucleo board, so it should be possible to surface them to the micropython environment thru the HAL.

from caravel_board.

abdullahyildiz avatar abdullahyildiz commented on July 21, 2024

@proppy,

UART peripheral pins on management SoC is not connected to Nucleo board. We were able to interact with it by standard UART cable.

from caravel_board.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.