Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:30
    bm16ton commented #1457
  • Jan 25 22:05
    bm16ton commented #1457
  • Jan 25 21:42
    roman65536 commented #1457
  • Jan 25 21:01
    bm16ton commented #1457
  • Jan 25 19:20
    roman65536 commented #1457
  • Jan 24 21:26
    karlp closed #1459
  • Jan 24 21:26

    karlp on master

    README: update toolchain recomm… (compare)

  • Jan 24 16:06
    karlp reopened #1459
  • Jan 24 16:06
    karlp commented #1459
  • Jan 24 12:14
    harrygeyer synchronize #1456
  • Jan 24 09:10
    embeddedATsleepinnov commented #1459
  • Jan 23 15:50
    karlp closed #1459
  • Jan 23 15:50
    karlp commented #1459
  • Jan 23 14:54
    embeddedATsleepinnov opened #1459
  • Jan 22 13:39
    bm16ton commented #1457
  • Jan 22 12:37
    roman65536 commented #1457
  • Jan 22 12:36
    roman65536 commented #1457
  • Jan 20 15:53
    dzarda commented #1359
  • Jan 20 14:09
    bm16ton commented #1457
  • Jan 20 14:05
    slorquet commented #1457
there is a part that is interrupt based and has a similar idea to ours:

```static void bulk_tx_cb(usbd_device * usbd_dev, uint8_t ep)
{
char buf[64] attribute ((aligned(4)));

(void)ep;

/* Keep sending packets */
usbd_ep_write_packet(usbd_dev, 0x82, buf, 64);

}```

"keep sending packets" <<< evidenced by this
dxld
@dxld:it-syndik.at
[m]
and I read the ST peripheral register docs multiple times over, though I guess mine was _v2 on a STM32F0 instead of _v1 hmm
Yusuf Celik
@YusufCelik
wish I had the host code for this
dxld
@dxld:it-syndik.at
[m]
did you have a look at the gadget0 test/example code?
that has a host side thing too you can play with
Yusuf Celik
@YusufCelik
hopefully they do not say "look example for bulk transfers" let's just write 64bytes!!!!
haha
dxld
@dxld:it-syndik.at
[m]
perhaps, not sure :)
Yusuf Celik
@YusufCelik
(facepalm; but I can already do that. I just need an example that exceeds that number and performs at speed)
one thing though: this thing started because I almost felt like I had 9600bps speeds (worse than serial)
dxld
@dxld:it-syndik.at
[m]
it's still worth a look I think
Yusuf Celik
@YusufCelik
initially, when I used my HOST -> request -< MCU send data loop (4096) to send 256kb
dxld
@dxld:it-syndik.at
[m]
it runs a bunch of different tests
Yusuf Celik
@YusufCelik
4096 times of 64bytes was abysmally slow
but was it due to the implementation or some hidden flaw
(well, you used the blue pill built-in usb connector, that one only does usb 1.0)
(you should have made an external usb connector via the gpio pinouts)
dxld
@dxld:it-syndik.at
[m]
I guess it's also possible your descriptors are just wrong
if, for example, you set your EP to be of interrupt transfer type you could get a trickle of only 64b per milisecond :)
Yusuf Celik
@YusufCelik
Screen Shot 2022-06-19 at 10.40.54 AM.png
the mac assumes a 12mb/s speed
let me double check bmAttributes
0x02 = assuming this is bulk transfer because
Bits 0..1 Transfer Type 00 = Control 01 = Isochronous 10 = Bulk 11 = Interrupt Bits 2..7 are reserved. If Isochronous endpoint, Bits 3..2 = Synchronisation Type (Iso Mode) 00 = No Synchonisation 01 = Asynchronous 10 = Adaptive 11 = Synchronous Bits 5..4 = Usage Type (Iso Mode) 00 = Data Endpoint 01 = Feedback Endpoint 10 = Explicit Feedback Data Endpoint 11 = Reserved
dxld
@dxld:it-syndik.at
[m]
I'd check lsusb -v on the host to be extra sure (that's a linux thing though)
Yusuf Celik
@YusufCelik
lsusb Speed: Up to 12 Mb/s
dxld
@dxld:it-syndik.at
[m]
-v would give you a Device Descriptor: readout
that decodes bmAttributes among other things
but whatever 0b10 seems right
Alexander Voronov
@crvux
Hello!
There is exist some tool to generate initialization code like CubeMX but for libopencm?
hazardousfirmware
@hazardousfirmware
Hello! is there an example to set up the RTC on stm32f1 to count while using VBAT?
Currently using rtc_auto_awake(RCC_LSE, 0x7fff); it saves the count register but doesn't increment. thanks
Achintya-Chaware
@Achintya-Chaware
Hi! I am just getting started. I wanted to know how to use libopencm3 with STM32 Cube IDE. Any resource available?
karl
@karlhh
Hello
I'm trying to get usb cdcamc example (loopback) working on f413 board of my own design. The code works on f411 black pill but not on f413, anyone know of specific difference in usb implementations between these? I thought they were basically the same. Also worth mentioning is that dfu bootloader enumerates fine so I don't think its a problem with the board but when running my code it shows no activity whatsoever on usb data lines.
Ben Maddocks
@bm16ton
hello it was a while ago so dont remeber everything required but i got i2c-star going on the nucleo 413zh here is the code https://github.com/hackthedumpster/i2c-star-f413hz i bbelieve it required sum patching to libopencm3 the repo has its own libopencm3 with it. could try the firmware as is and if it works on your board copy the lopc3 over to your project. May wanna check if i disabled vbus sensing etc as well.
karl
@karlhh
Thank you Ben! I will look into it tomorrow, time to go to bed now.
karl
@karlhh
@bm16ton I love you man! Just switched to your version of libopencm3 and it works! I'm going to look closer into the difference in /lib/usb/ and see if I can pinpoint what made it work.
Ben Maddocks
@bm16ton
about halfway down in this issue is a list of pull requests for various usb fixes, most likely these (or some combination of them) is what i used to get the usb on the 413 going. libopencm3/libopencm3#1309 .The 413zh is interesting with newer features like being able to run code from spi flash, 10uart's, 6usb endpoints but clocked at a slower 100mhz. Anywho ive found those patches useful for a variety of my boards, i do believe the 413 among them.
Ben Maddocks
@bm16ton
So despite being outa my depths i decided to try and use my 2 usb3300's and my h7 portenta with ulpi onboard. And with the luck of Forrest Gump after adding a few defs and changing the f207 usb driver init all 3 enumerate and work! I imagine more hasta be done, i thought i needed to setup sum larger buffers based on amount/type of endpoints etc.So if anyone knows of more things i need to setup please let me know. But After they worked I moved on. I managed to get the 16mb of external ram on the portenta setup and going and this is my main question. The methods ive found thus far for integrating the ram as system mem in the ldscript requires edits to assembly written startup scripts. Not sure the best course of action. Best case is libopen has support for integrating external ram as system mem and i just need to supply it sum info..havent seen that yet but im hopeful.I guess hacking the vector file thats part of the linker script generation is doable but probly not the best solution.Any thoughts are appreciated. If it was ez enuff for me to do i caint imagine anyone else would need it but i can throw my usbhs/external ram code on github if anyone needed it, expect beginner level of code tho.