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

Problem Program SAMD51 from UART1 (SERCOM3) - Metro M4 AirLift #178

Open
sergioxdev opened this issue Oct 12, 2021 · 2 comments
Open

Problem Program SAMD51 from UART1 (SERCOM3) - Metro M4 AirLift #178

sergioxdev opened this issue Oct 12, 2021 · 2 comments

Comments

@sergioxdev
Copy link

Hi Guys

I am testing the grand central meter,
i would like to program this chip from another uart input, other than native usb,
switching from usb to another uart via a pin.

Any info are accepted

@sergioxdev
Copy link
Author

Hi Guys
I update you, doing research I found the following posts:

I am tested it a metro m4 airlift, because i want to update the SAMD51 via serial UART,

  1. I made these changes to the uf2.h file
    // ------------------------------------------------ ---------
    #define USE_LOGS 0
    #define USE_ASSERT 0
    #define USE_FAT 0
    #define USE_INDEX_HTM 0
    #define USE_CDC 1
    #define USE_UART 1
    #define USE_HID 0
    #define USE_WEBUSB 0
    #define USE_MSC 1

#define USE_SINGLE_RESET 1

#define USE_HID_SERIAL 0
#define USE_HID_EXT 0
#define USE_HID_HANDOVER 0
#define USE_MSC_HANDOVER 0
#define USE_MSC_CHECKS 0
#define USE_CDC_TERMINAL 0
#define USE_DBG_MSC 0
// ------------------------------------------------ ---------

  1. I connected a FT232R on the RX / TX pins of the metro

  2. I try to send the same bytes as the BOSSA, "0x4e, 0x23, 0x56, 0x23", to start the boot programming

but I don't get any response
some suggestions, to understand where I'm wrong
Thanks in advance

@sergioxdev sergioxdev changed the title Program SAMD51 from another UART other than native usb Problem Program SAMD51 from UART1 (SERCOM3) - Metro M4 AirLift Oct 21, 2021
@sergioxdev
Copy link
Author

sergioxdev commented Oct 21, 2021

Hi Guys

I update you, doing some debugging I found the problem

uf2-samdx1/src/main.c

if (!main_b_cdc_enable && usart_sharp_received()) {

the problem is about usart_sharp_received ()

going backwards.

uf2-samdx1/src/usart_sam_ba.c

if (usart_is_rx_ready()) {

the problem is about usart_is_rx_ready ()

going backwards.

bool usart_is_rx_ready(void) {

the problem is here, however FT232R is connected with the RX / TX pins of the Metro,
I try to send "#" on the serial, but usart_is_rx_ready () always returns false;

I also tried always on main to send a byte on UART1 (SERCOM3) with:
usart_putc (1);
but it does not send anything

Any suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant