Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USART For the small On/Off remote looks inverted #10

Open
Jerome-PS opened this issue Aug 17, 2020 · 4 comments
Open

USART For the small On/Off remote looks inverted #10

Jerome-PS opened this issue Aug 17, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@Jerome-PS
Copy link

Hi,

Thanks for the good work!
It looks like, contrary to what is written in efm32/ports/efm32/README.md, the USART is configured for pins PB14 and PB15. But if you follow the marking on the board, PB14 seems to be US0_TX and PB15 US0_RX (so locations 9 and 9 and NOT 8 and 10).
Does it make sense to put the in a init.py script to have the same binary for everyone and just a "site" auto exec script that would do the configuration?

Cheers.

@osresearch osresearch added the bug Something isn't working label Aug 29, 2020
@osresearch
Copy link
Owner

I'm just getting back to this project and will check out the pin outs. It's highly likely that I swapped them at some point when I was trying to unify the USART setup code between the different boards.

@Jerome-PS
Copy link
Author

Jerome-PS commented Aug 29, 2020

Hi,

Also, there is a mistake in pin_defs.h, available pins are PC10 and PC11 NOT PC11 and PC12 !!!

Here is the information I have collected for the small 2-button remote:
(For the U/D, I did not check which corresponds to the 1 or 0 embossing on the enclosure)

{ {&machine_pin_type}, gpioPortA, 0,  0, PWM(0,0) }, // pcb label PWM4	- PA0	Join BTN
{ {&machine_pin_type}, gpioPortA, 1,  1, PWM(1,0) }, // pcb label PWM3	- PA1	
{ {&machine_pin_type}, gpioPortB, 12, 2, PWM(2,5) }, // pcb label PWM2	- PB12	U/D BTN
{ {&machine_pin_type}, gpioPortB, 13, 3, PWM(3,5) }, // pcb label PWM1	- PB13	

// right side going up
{ {&machine_pin_type}, gpioPortB, 15, 4, NO_PWM }, // RX			- PB15	RX
{ {&machine_pin_type}, gpioPortB, 14, 5, NO_PWM }, // TX			- PB14	TX
{ {&machine_pin_type}, gpioPortC, 10, 6, NO_PWM }, //			- PC10	U/D BTN
{ {&machine_pin_type}, gpioPortC, 11, 7, NO_PWM }, //			- PC11	LED
{ {&machine_pin_type}, gpioPortF, 0,  8, NO_PWM }, // SWCLK		//TODO: see if user can kill his debug connection
{ {&machine_pin_type}, gpioPortF, 1,  9, NO_PWM }, // SWD			//TODO: see if user can kill his debug connection
{ {&machine_pin_type}, gpioPortF, 2,  10, NO_PWM }, // ?			- F2
{ {&machine_pin_type}, gpioPortF, 3,  11, NO_PWM }, // ?			- F3	SPI FLASH VCC and HOLD

// internal connections
{ {&machine_pin_type}, gpioPortB, 11,  12, NO_PWM }, // spi cs
{ {&machine_pin_type}, gpioPortD, 13,  13, NO_PWM }, // spi sck
{ {&machine_pin_type}, gpioPortD, 14,  14, NO_PWM }, // spi miso
{ {&machine_pin_type}, gpioPortD, 15,  15, NO_PWM }, // spi mosi

@Jerome-PS
Copy link
Author

PF3 must be driven high, or the FLASH chip does not operate.

@Jerome-PS
Copy link
Author

In mpconfigport.h, if you do the following, device registers become accessible from Python, by using machine.mem32[addr], this is very useful, even though it uses more code space, it still perfectly fits into the device's 256kB:
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)

depau added a commit to depau-forks/micropython that referenced this issue Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants