Giter Club home page Giter Club logo

debugdonglefw's Introduction

DebugDongle Build Status

This repository contains the embedded firmware of the DebugDongle, a USB power supply and serial port for prototype debugging.

Features

  • Bidirectional UART connection is relayed to the USB serial port.
  • Power is supplied to an external board: Either the USB voltage or the output of the 3.3V step-down converter. The selection can be made by an onboard switch or by the USB HID interface. The voltage level is indicated by a dedicated LED.
  • The onboard Li-ion battery charger IC can charge a connected battery. The charging is managed by the software and can be supervised by the USB HID interface. Indicator LEDs give visual feedback on the USB power's presence and the ongoing charging.
  • An independent USB HID sensor interface provides core voltage and temperature, and ambient illuminance measurements.
  • The bootloader's DFU interface is mapped on the USB device. The DFU updater client can use the same interface in application mode to send the device to update mode.

Target hardware

The firmware is written for an STM32F042F6 device (TSSOP-20 package, 32kB flash, 6kB SRAM, 48MHz clock). By changing the BSP layer it is possible to port the application to any STM32 device which is supported by STM32_XPD.

External dependencies

This firmware uses DFU bootloader, which is built for this target with the following parameters:

TARGET_HEADER="\<stm32f040x6.h\>" SERIES=STM32F0 FLASH_APP_ADDRESS=0x08002000, FLASH_APP_SIZE=24*1024, FLASH_TOTAL_ERASE_TIME_ms=480, USBD_VID=0xFFFF, USBD_PID=0xF042, VDD_VALUE_mV=3300

For a standalone operation the DFU interface must not be mounted on the application USB device, and the application flash offset has to be removed.

Built with GCC ARM tools.

debugdonglefw's People

Contributors

benedekkupper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

debugdonglefw's Issues

VCP in buffer not updated (from device to PC)

I have an issue with the DebugDongle when used as a USB to USART bridge. I'm using it extensively and it never fails if the COM port (from the PC point of view) is never closed. But if we close the COM port there is a condition where the buffer sent back to the PC is in fact the previous one (as if the double buffer is not changing page, or changing 2 times ?).
Let me explain how you can replicate the issue: tie together UART Rx and UART Tx so everything is echoed back to the PC. Now I made a application which sends a random number of bytes between 2 to 64 every 100ms and verifies that the received content is the same as what we sent. As said earlier if the COM port is never closed then the application never fails.
Now whenever the number of bytes is equal to 25 (arbitrary can be anything) I choose to close the COM port, wait 100ms, open it again, wait 200ms and start again to send random number of bytes. In some cases the dongle will eventually fail and always send the same buffer (albeit the number of bytes being right).

Compiling error

Hello!

I am getting the error below when i try to compile:

mkdir build_200_200
/usr/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -DUSBD_VID=0x200 -DUSBD_PID=0x200 -DHW_REV= -IBSP -IApp -ICharger -ISensor -IVCP -IHidReportDef/include -IUSBDevice/Include -IUSBDevice/PDs/STM32_XPD -ISTM32_XPD/CMSIS/Include -ISTM32_XPD/CMSIS/Device/ST/STM32F4xx/Include -ISTM32_XPD/STM32F4_XPD/inc -O3 -Wall -fdata-sections -ffunction-sections -std=gnu11 -MMD -MP -MF"build_200_200/bsp_usart.d" -MT"build_200_200/bsp_usart.d" -Wa,-a,-ad,-alms=build_200_200/bsp_usart.lst BSP/bsp_usart.c -o build_200_200/bsp_usart.o
In file included from BSP/bsp_usart.c:23:0:
BSP/bsp_io.h:34:13: error: operator '>' has no left operand
#if (HW_REV > 0xA)

Missing last bit of UART transmit

Hi !
I'm having an issue with the VCP part of the dongle.
When I'm sending 'U' over a terminal like putty, and looking at the scope output on PA2 (USART2_TX), I can see that the last bit is missing because I receive 0xD5 instead of 0x55. At first I thought it was the _WFI instruction in the main while loop that was happening too fast, but putting it in comment didn't solve the issue. Then I looked in the USART_prvDmaTransmitRedirect function and there is no check of the TC flag of USART, which needs to be checked before deactivating the DMA. Do you have any idea on this ?

(not an issue) VCP INF driver for win 8 and older

Hi,

Thank you for the correction made to the VCP, I will test them as soon as possible and update you on the outcome.
On a side note, do you happen to have by any chance a driver file for the dongle for win 8 and older ?
On my win 10 PC everything is working as it should, but on some older machine I tried the ST VCP driver but it failed to send back the content of the UART to the USB pipe.
Any idea ?

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.