4 ms·
no, i spent months on this, and the answer is no They use IP from synopsis, but <rumor>synopsis refuses to allow their docs to be published so every manufactur
by dmitrygr 7y ago
no, i spent months on this, and the answer is no
They use IP from synopsis, but <rumor>synopsis refuses to allow their docs to be published so every manufacturer has to read them and regurgitate them into their own docs in their own words</rumor>. In any case official STM docs are incomplete. See their driver source - it accesses undocumented registers and sets undocumented bits in documented regs. Without them the usb core will not start or run.
Your options are to carefully rewrite STM's libs (which are based on real synopsis docs and DO work) or use them as is. Both solutions IMHO leave you subject to STM's EULA and such
this is the #1 issue in stm32
a close #2 is the their so-smart-it-is-useless i2c controller. I know of no project that uses it. Everyone bitbangs i2c master on stm32. The hardware unit is very easy to wedge to a point where only a power cycle unwedges it.
- kevin_thibedeau 7y agoIt's not a rumor. You have to be a Synopsys licensee to see the docs on their IP cores.
- duskwuff 7y agoCan you point to where the undocumented registers are used in the source? I don't see anything obvious that fits that definition in: https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Middlewares/ST/STM32_USB_Device_Library https://github.com/STMicroelectronics/STM32CubeF4/tree/maste... (I've chosen the version for STM32F4 arbitrarily; if there's something similar in one of their other USB support libraries, feel free to point to that instead.)
- dmitrygr 7y agoa few bits used here are not in the docs: https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_usb.c https://github.com/STMicroelectronics/STM32CubeF4/blob/maste...
- duskwuff 7y agoThat's a 2000-line file. What part of it are you referring to?
- HeyLaughingBoy 7y agoMaybe I don't understand the question. Aren't the STM32 CDC libraries redistributable?
- duskwuff 7y agoThe STM32 USB libraries are provided under the oddly named "Ultimate Liberty License" [1], which is actually incredibly restrictive -- it requires the code to only be used on ST hardware, and prohibits it from being used "in any manner that would subject this software to any Open Source Terms". [1]: http://www.st.com/SLA0044 http://www.st.com/SLA0044
- rabryan 7y agoAvoid ST at all costs in my experience. Their documentation is terrible. They never acknowledge hardware errata even after clear evidence of it. They’re not a company with a solid engineering culture imo
- detaro 7y agoWhich MCU makers do you prefer?
- rabryan 7y agoAtmel (now under Microchip). They have great documentation and software libraries. And they actually acknowledge hardware errata in the documentation.
- reportingsjr 7y agoI used a SAMD21 for my latest project and I was definitely impressed with it versus STM32s. I will say that STM has definitely released better tools that make it much easier to get designs up and running (STM32Cube specifically).
- userbinator 7y agoAnd they actually acknowledge hardware errata in the documentation. More so for Microchip than Atmel --- it's pretty common to find on some of their newer and more complex parts a ton of errata, among which there are some extremely "WTF!?" ones like "feature X does not work at all".
- rabryan 7y agoYeah I love those. They highlight features xyz on first page of datasheet. Then on the last few pages its like btw features xyz dont work on rev A-F. And your supplier doesnt know what revs they have...
- __init 7y agoI'm really surprised to hear that. ST has always been one of my favorite manufacturers. I find their datasheets to be clear and well laid out, though I will note that I'm usually more interested in the hardware side than the software side. Their chips and boards are also high quality and convenient, e.g. GPIOs are often five-volt tolerant, Nucleo boards come with well-made breakout headers and several peripherals (at seemingly impossibly low cost), chips have wide supply voltages, etc. I can't say I know anything about their errata (I've never run into any), but even if the situation is as bad as you say, that's quite a harsh condemnation, especially considering how widely-used and successful they are in industry. Do you have other complaints?
- _noise_ 7y agoI don't know what issues you are having with STM32 I2C, but I have done dozens of STM32 designs and have never had an issue and needed to bitbang it.
- dmitrygr 7y agoSend an address only packet (smbus uses these) Just try. Now do it to an address that doesn't ack. Enjoy your wedged i2c state machine.
- thebruce87m 7y agoI’ve recently used the “HAL_I2C_IsDeviceReady” function to scan the whole address range to find devices on the bus with no issues. I’m not near my PC to double check but I’m pretty sure that does what you’re talking about and seems to work ok for me - unless you’re suggesting it’s intermittent?
- lochsh 7y agoI think it's worth noting that there are multiple I2C peripherals by ST -- one for STM32F1, F4, and L1; and a different one used for STM32F0, F3, F7, L0, and L4.