hybridfree/eevblog-posts huggingface dataset:
Stepping out of blindness - Page 1
Forum section: electronics / projects

author: JacquesBBB
author_rank: Frequent Contributor
timestamp: November 27, 2016, 05:01:11 pm
content: After some difficult times trying to solder a MSP432 LQFP100 package with 0.5mm pitch on a ti MSP launchpad,( I was trying to update from XMS432P401R rev B to MSP432P401R rev C)using as only visual aid this 5$ lousy magnifier,http://www.ebay.com/itm/Third-Hand-Soldering-Solder-Iron-Stand-Helping-Magnifying-Tool-Magnifier-HS-/111707154760?hash=item1a0243e948:g:FrkAAOSwDNdVkebaI decided to follow the advice of 2N3055Quote from: 2N3055 on November 14, 2016, 12:24:23 amand get a decent stereo microscope. After some search on the web, I decided for the Amscope SM-4TZ, and despite it is much more expensive in France than in the US, I made the jump for this modelhttps://www.amazon.fr/AmScope-SM-4TZ-eacute-omicroscope-trinoculaire/dp/B004V1KD2E/ref=sr_1_1?ie=UTF8&qid=1480265262&sr=8-1&keywords=AmScope+SM-4TZI did not bought the illuminating ring which was another 70$, but rapidly put together two 10w leds withheat sink from my junk and add a small regulated power supply that was on my shelf and put itwith two piece of electrical thick hard wire to be used as goose neck support, and there it was.I must say it was really a revelation, and I understand that before I was just blind. Now I can really seein a very crisp manner the process of reflow of the solder and all the subtle effet of superficial tensionsthat occur in drag soldering.What is impressive is the stereo effect, with the rendering of depth, which no online movie can render.Despite this is the most expensive device of my workshop ( the second is my Rigol DS1054z),I am very happy with this purchase, that really open some new perspectives for me.I have now successfully replaced the XMS432P401R rev B to MSP432P401R rev C on 5 boards. I still have a lot to learn, but really made a step forward with this microscope.

author: 2N3055
author_rank: Super Contributor
timestamp: November 27, 2016, 05:38:30 pm
content: Jacques,I told you so...I'm very glad you like it ..Have a good one ..

author: RoGeorge
author_rank: Super Contributor
timestamp: November 27, 2016, 06:21:42 pm
content: Indeed, an optical STEREO microscope will always outperform any USB toy. The difference is huge, and the optical one will run forever.Keep it clean, and covered against dust when you are not using it. The main enemy of optical tools is the mold that might grow inside optics, but this can happen only after decades if the instrument is properly used and stored.That's a very good tool, congrats!

author: Gyro
author_rank: Super Contributor
timestamp: November 27, 2016, 06:59:28 pm
content: QuoteFlip-up rifle scope covers make really good eyepiece covers, and are cheap from China. They come with fairly strong springs but if you don't like that, it's easy to push out the hinge pins and replace the springs with a bit of sleeving. Eg. (lots of sellers)...http://www.ebay.co.uk/itm/Flip-Up-Lens-Cover-Cap-Rifle-Scope-Telescopic-Sight-All-Size-Available-Black-/161085570214?var=&hash=item258172bca6:m:mEwSQAviUPmJn96hF2pFneQ
Stereo mixer amplifier - Page 1
Forum section: electronics / projects

author: DonKu
author_rank: Regular Contributor
timestamp: October 06, 2019, 03:04:18 pm
content: Greetings,An article about my stereo mixer-amplifier project is now available.http://crcomp.net/electronic/mixeramp/index.phpThank you, 73,--Don Kuenz KB7RPUThere was a young lady named Bright Whose speed was far faster than light;She set out one day In a relative way And returned on the previous night.

author: moffy
author_rank: Super Contributor
timestamp: October 07, 2019, 08:44:57 am
content: The specs for the isolation transformers says: 10. Total Harmonic Distortion < 0.5% between 275Hz and3.5KHz. It looks like they were primarily meant for telephone systems, rather than audio/hifi. Pretty high distortion levels in the band, will be higher outside.

author: Zero999
author_rank: Super Contributor
timestamp: October 07, 2019, 09:23:00 am
content: The load on the secondary of the transformers is fairly low anyway, so you could do away with the op-amp mixer and connect the secondary windings of all of the transformer in series, to mix the signals passively. The only downside is some power from each signal will leak over into the others, but if the load on the transformer secondary windings is high impedance, it will be negligible.

author: DonKu
author_rank: Regular Contributor
timestamp: October 07, 2019, 03:19:53 pm
content: Quote from: moffy on October 07, 2019, 08:44:57 amGood information. If you don't mind me asking, do you know of a better, readily available transformer?

author: DonKu
author_rank: Regular Contributor
timestamp: October 07, 2019, 03:22:56 pm
content: Quote from: Zero999 on October 07, 2019, 09:23:00 amInteresting idea.

author: moffy
author_rank: Super Contributor
timestamp: October 07, 2019, 03:31:11 pm
content: https://jensen-transformers.com/wp-content/uploads/2014/09/Audio-Transformers-Chapter.pdf. High nickel mu metal core material gives between 0.001% to 0.01% distortion. They are a lot more expensive though.

author: DonKu
author_rank: Regular Contributor
timestamp: October 07, 2019, 03:36:21 pm
content: Quote from: moffy on October 07, 2019, 03:31:11 pmBill Whitlock's literature is well known to me. As you say, his excellent solutions are much more expensive (deservedly so) than my own humble telephone quality solution.
Stereo-to-Mono Mixing and Input Switching Based on Jack Insertion Detection - Page 1
Forum section: electronics / projects

author: ricko_uk
author_rank: Super Contributor
timestamp: July 21, 2025, 10:07:00 pm
content: Hi all,I'm working on a compact audio circuit and could use some guidance and ideas from those with experience in analog design.I have two stereo audio sources:• One from a 3.5 mm TRS jack (signal from mobile phones)• One from a BM83 Bluetooth audio module (datasheet attached)My requirements are:• Each stereo input must be converted to mono by mixing its left and right channels.• After mono conversion, only one mono source is used in the downstream circuit.• Source selection is based on jack presence: if a 3.5mm plug is inserted, the mobile input takes priority and the BM83 should be ignored. On the PCB there is a micro which can also disable the BM83 if required.I was wondering if you could provide some suggestions/feedback on the following:1) The source selection could be handled via jack switch/detect pins placed somewhere along one of the signal paths.2) Alternatively, the jack detect pin could be routed to the microcontroller to put the BM83 into reset mode, placing its audio outputs in a high-impedance state.3) However, I’m wondering if there are other clever, simple analog solutions where all inputs remain always connected—perhaps using a mixer or an op-amp configuration?Because PCB is very tiny, I’ve been considering a simple op-amp mixer, where all four signals (L and R from two sources) are fed into a single mixing op-amp.Not sure if that is an option because I’m unsure about how to handle biasing, potential amplitude shifts, and DC offsets.Thank you as always

author: themadhippy
author_rank: Super Contributor
timestamp: July 21, 2025, 10:34:26 pm
content: Id go with option 1 using something like the cliff JY039-5,then a simple resistor combiner to get the mono signal

author: ricko_uk
author_rank: Super Contributor
timestamp: July 22, 2025, 05:30:40 pm
content: Thank you themadhippyI didn't see that configuration of switches inside the jack before.That makes it obvious.Thank you

author: jwet
author_rank: Frequent Contributor
timestamp: July 24, 2025, 03:48:41 pm
content: Maxim wrote some app notes about Jack Sensing topics and built some parts that did some of this stuff internally. They generally used the NC switches on TRS type jacks and would sense opens with high value resistors. Google the part numbers below and you'll find the threads that talk about it. Its usually pretty simple but not obviousMax97236 had some jack sensing built inMax13330 had some app notes on this topicRegards
Still can't decide if my application project estrictly need a snubber.  - Page 1
Forum section: electronics / projects

author: XaviPacheco
author_rank: Regular Contributor
timestamp: June 23, 2018, 02:39:27 am
content: Hello,As some of you have seen in some of my previous posts, I've been trying to design by myself a PMDC Brushed Motor controller for treadmill purposes. Attached you can find the nameplate of my motor, and the official schematics about the power stage. In the schematics you can see the components that I have selected for the PCB. I don't attach the microprocessor stage, it will just simply output the PWM signal, process speed signal, current measurements, (adjustment of duty cycle according to load) and other minors functions.PWM frequency: 10 kHz. but it may vary depending on the performance in empirical tests. The microprocessor will be a STM32 nucleo, so 3.3V port voltage.I haven't simulated this circuit. I want to make a PCB to take some real measurements. This is a first prototype for a college project. It's hard to expect that everything will work at first attempt. So I expect to make further improvements.That was a brief introduction. The reason of this post is for you to give suggestions about the design, and help me determine if I need a snubber across the MOSFET, and what kind if needed (RC, RCD, etc). I haven't found a solid guideline to design a proper one.
Still Confused: Strain Gauge interfacing - Page 1
Forum section: electronics / projects

author: A2
author_rank: Contributor
timestamp: March 26, 2014, 12:35:26 pm
content: Besides couple of threads I had started I have still some confusion regarding it.I am rephrasing my query to make it more clear.Figures may vary from previous thread & please correct me where I am wrong.I have used a strain gauge with following specs:Gauge factor = 2Unstrained resistance = 1000ohmmax strain = 50000ueI have attached the schematic.1. I have connected 5V to wheatstone brigde & kept other three resistors as 1000ohm.2. total percentage change in resistance = gauge factor * strain = 2*50000*10^-6 = 6%.So total chnage in resistance = 60ohm.3. I have connected a microcontroller to read the voltage. With 1 ohm change in strain gauge I read 1.249mV.I don't know how I can calculate weight from it. There must be some mathematical realtionship between them.How can I get with millivolts so much strain is produced or so muck kg of weight is applied.

author: han
author_rank: Frequent Contributor
timestamp: March 26, 2014, 01:06:35 pm
content: as far i know:i never use strain gauge since it's not directly can measure weight(it's measure mechanical stress)but if you using load cell here is the calculationtypical spec:(http://www.omega.com/Pressure/pdf/LC307.pdf)Excitation: 5 VdcOutput: 1.5 mV/V nominalBridge Resistance: 350 ? minimumCapacity : 10KN (~1 metric ton)how to get the weight?output =1.5 mV/V, so at 5V output is 7.5mV (small isn't it?)the 7.5mV output is the max output at max capacityso the calculation is: Volt/weight = 7.5mV/1000 kG7.5 microVolt/KGthat's why you need 24bit ADC
Stirling Cycle Cryocooler - Applications? - Page 1
Forum section: electronics / projects

author: Photon939
author_rank: Regular Contributor
timestamp: March 01, 2016, 07:06:47 pm
content: A while back an impulse purchase on ebay netted me an old piece of communications gear with a neat toy inside: a stirling cycle cryocooler, I believe it is this model seen here:http://www.suptech.com/sapphire_cryocooler_n.phpwhich would put it at a cooling capacity of 4-5 watts at 77KI have already used it in a crude setup to liquify air for messing around with liquid nitrogen type experiments, but was wondering if it could have some more interesting applications in the area of electronics. The original application was cooling an RF LNA for cell phone towers or something.I am also looking to see if anyone knows of a cheap source of gas separation membranes.

author: HAL-42b
author_rank: Frequent Contributor
timestamp: March 01, 2016, 07:09:44 pm
content: You could cool an image sensor for some nifty IR work.

author: LaserSteve
author_rank: Super Contributor
timestamp: March 01, 2016, 07:48:52 pm
content: Cool a 635 nm red laser diode down to get an orange or yellow wavelength. Been done, but orange and yellow lasers are rare as hen's teeth.. Or a really low noise RF preamp...Steve
STK4048II amplifier instability - Page 1
Forum section: electronics / projects

author: TransistorMan
author_rank: Contributor
timestamp: September 12, 2017, 02:25:21 pm
content: Recently, I built STK4048II based amplifier, and I ran at pretty weird issue.In past few years, I built dozen audio amplifiers, some fully integrated (TDA2003, 7294 etc), as well as some completly "discrete" amplifiers,all within 1-100ish W RMS, and I never ran at this problem.I used datashet schematic,almost without any changes,except I designed my PCB:http://www.electronica-usa.com/graphics/STK4048II.pdfOnly modification to schematic that I made was, that I used 3,3 ohm resistors instead od 4,7 ohm resistors in Zobel/Thiel network.When testing amplifier, I conect 10 ohm resistors between powe supply, and amplifier module, to protect amplifier in case of shorted output or something similar.My power supply is simple - 2x30V mains transformer, rectifier, 0,33uF and 10 000uF capacitors and 820 ohm bleeders, wich gives me 42VDC when unloaded.The issue is next:When I use speaker cable(approx. 2m long, 2,5mm^2), and crocodile clip cable (aprox. 1m) to connect speaker, quite often, for no obvius reason, amplifier output just sticks to negative supply rail. As soon as I unplug that cable(it is connected to board with 2 pin NS39 connector), amplifier recovers. Just disconecting speaker, without disconecting cable from PCB, doesn't fix problem.When I use just crocodile clips to conect speaker, everything works just fine.Increasing speaker cable length doesn't change anything.So, I assumet that problem might be caused by weird Zoble/Thiel network at the output (RC element paralel to speaker, "after" LR element, instead of regular network where RC element is right at the amplifier output), I removed that 0,1uF capacitor. That helps a lot, but still sometimes output voltage "sticks" to negative supply.I would realy appreciate any help and ideas on what might be causing this problem,and how to fix it.

author: TransistorMan
author_rank: Contributor
timestamp: September 12, 2017, 06:29:38 pm
content: UPDATE:looks like that removing 0,1uF capacitor doesn't help at all.However, connecting power supply ground to mains ground prevents output from sticking to negative supply rail,in fact, so far it seems to be solving almost all problems i had...Only weird thing happening now is that sometimes, without input signal, amplifier "draws" about 200-300mA more from positive rail, than from negative.Any ideas why just connecting power supply GND to mains GND would do such a difference?

author: TransistorMan
author_rank: Contributor
timestamp: September 12, 2017, 09:11:27 pm
content: So, looks like that this was holding me back for a while...Let this be a lession for you: ALLWAYS check your cables...even if they are brand new ones...connect them to continuity meter and flex them arround little bit...
STM32 help needed in south of Spain to fix reverse geocache box for birthday! - Page 1
Forum section: electronics / projects

author: niekvs
author_rank: Contributor
timestamp: April 24, 2017, 09:41:06 pm
content: Ok, this is going to be a strange request that I didn't think I needed to make. This is the situation: I made a "reverse geocache box" for my father's birthday which my family is celebrating in Spain this week (25 April). It's a box that only opens in a specific location and reveals a gift. I'm from the Netherlands and tested the box thoroughly in my own country. Now I'm in Spain with the box, but without my laptop, and to my dismay discovered that it's no longer working. The reason? The code that checks is there's a satellite gps fix checks if the coordinates are > 0. In the Netherlands, this works great. Unfortunately Spain is west of Greenwich...I have the code in the cloud. I just need someone local with some experience and a computer with st-link who has a STM32 environment set up (the project is using the stm32f103 "blue pill"), so that I can reprogram with the one line fix without spending too much time away from family. I'm near Granada and have a car.I realize it's a long shot, but I thought I could ask. Let me know if you think you can help! I'd very much appreciate it.Thanks a lot in advance...Niek

author: FreddyVictor
author_rank: Regular Contributor
timestamp: April 25, 2017, 08:19:32 am
content: lots of people with STM32F103 boardsmaybe if you gave a link to your code someone will take a look ?

author: Kilrah
author_rank: Unknown
timestamp: April 25, 2017, 08:39:59 am
content: Looks like he's OK on the code side, just needs the hardware for programming.Who ever travels without a laptop

author: FreddyVictor
author_rank: Regular Contributor
timestamp: April 25, 2017, 09:48:16 am
content: Quote from: Kilrah on April 25, 2017, 08:39:59 amoh yeah - I mis-read it !probably needs to give a rough idea of whereabouts in Spain he is ?

author: Kilrah
author_rank: Unknown
timestamp: April 25, 2017, 10:05:39 am
content: Definitely. Spain is kinda big...

author: GeorgeOfTheJungle
author_rank: Super Contributor
timestamp: April 25, 2017, 10:14:08 am
content: Quote from: Kilrah on April 25, 2017, 10:05:39 am"I'm near Granada and have a car"

author: NivagSwerdna
author_rank: Super Contributor
timestamp: April 25, 2017, 11:30:39 am
content: Quote from: niekvs on April 24, 2017, 09:41:06 pmUnhelpful I know... but... Some of Spain is East of Greenwich
STM32 pins for 2 PWM signals in phase and 180 out of phase - Page 1
Forum section: electronics / projects

author: ricko_uk
author_rank: Super Contributor
timestamp: May 29, 2024, 07:49:27 pm
content: Hi,I am new to STM32 and am using a STM32L452RET6 to generate two PWM signals so that they can be configured via software to sometimes work in phase with each other (as if they are the same signal) and some other times to work 180 out of phase (when one is low the other is high and viceversa).I am currently using PA0 to generate the first PWM. But looking at the datasheet I am not sure which mode and pin could be used for a complimentary signal that could also be in phase just by different configuration.Could someone please point me in the right direction?If for some reason it is preferred to use another pair of pins, could you please suggest which ones.Thank you ‌

author: thm_w
author_rank: Super Contributor
timestamp: May 30, 2024, 12:02:00 am
content: You can use STM32Cube to look at pin functions. Click on Timers then TIM1 on the left side.You could use TIM1_CH1 and TIM1_CH1N, then you only need to set the Polarity and one will be inverted from the other or not.Its also possible to just use another PWM channel, then set the settings for each one to be the same, other than Polarity, eg:PA0 = TIM2_CH1. PA1, TIM2_CH2.

author: ricko_uk
author_rank: Super Contributor
timestamp: May 30, 2024, 11:35:08 am
content: Thank you thm_w
STM32 platform evalboard: XFR-L3 KYRNN - Page 1
Forum section: electronics / projects

author: EVW13
author_rank: Newbie
timestamp: December 26, 2014, 10:01:00 pm
content: Hi all!I want to share my version of evalborad for STM32platform -XFR-L3KYRNN. This is project based on industrial grade, super high-quality components and is targeting those persons who have tasks for rugged industrial requirements. There is no a lot of headers and bare PCBs, but a lot of unique transceivers, high quality connectors and better approach in the layout.Based on STM32F439VGT6 this evalboard offers Ethernet with TDR based on TLK106, RS-485 with termination and channel inverting based on MAX13451E, CAN with split based on MAX13041 and also such things as MRAM MR25H256, uSD card connectivity and more. It's considered to work in -40...+85 temperature range and seriously protected against ESD/EFT. Files may be downloaded from herehttp://dfiles.ru/files/5m7ytfmsq?redirect.This board is for specific applications and is not set against any eval-/devboard, but may serve a good job in developing some high-end industrial applications.Best RegardsEVW13
STM32 SAI - How to configure that bastard for I2S?! [solved, silly me] - Page 1
Forum section: electronics / projects

author: Yansi
author_rank: Super Contributor
timestamp: February 12, 2017, 10:16:56 pm
content: Hello!I have got a Wolfson WM8731 audio codec, that I'd like to interface to a SAI peripheral inside STM32F429 microcontroller.Datasheet:http://www.cs.columbia.edu/~sedwards/classes/2012/4840/Wolfson-WM8731-audio-CODEC.pdfI have successfully used the WM8731 some time ago, but was connected using the bog standard SPI/I2S peripheral, not SAI. This time, I have no free I2S peripheral pins, so I have to use the SAI. But it is a horrible struggle!Documentation of both SAI and the codec is crap and I found no useful examples for that damn SAI peripheral. (Luckily, the codec side of thing should be no problem, as I've written a decent software library for the control interface and due to previous experiments I am sure the codec is set correctly).What I want to do, is to configure the SAI to be a slave I2S interface. Nothing more, nothing less.The codec is set as a Master I2S, 256fs oversampling and should (I guess) output 64 BCLKs per sample.Can you help me please verify my settings of the SAI? Below is the current code. Depending how I try to fiddle with the settings, I get twice the DMA requests than I should or only single channel plays or I get a horrible noise (completely out of sync on the bus).Now I plan to probe it thoroughly with a scope and see what's happening there.Code:/* SAI init structure fill */SAI_StructInit(&SAI_InitStruct);SAI_FrameStructInit(&SAI_FrameInitStruct);SAI_SlotStructInit(&SAI_SlotInitStruct);/* SAI init for I2S mode */SAI_SlotInitStruct.SAI_FirstBitOffset = 0;SAI_SlotInitStruct.SAI_SlotActive = SAI_SlotActive_0 | SAI_SlotActive_1;SAI_SlotInitStruct.SAI_SlotNumber = 2;SAI_SlotInitStruct.SAI_SlotSize = SAI_SlotSize_DataSize;SAI_SlotInit(SAI1_Block_A, &SAI_SlotInitStruct);SAI_FrameInitStruct.SAI_FrameLength = 64;SAI_FrameInitStruct.SAI_ActiveFrameLength = 32;SAI_FrameInitStruct.SAI_FSDefinition = I2S_FS_ChannelIdentification;SAI_FrameInitStruct.SAI_FSOffset = SAI_FS_BeforeFirstBit;SAI_FrameInitStruct.SAI_FSPolarity = SAI_FS_ActiveHigh;SAI_FrameInit(SAI1_Block_A, &SAI_FrameInitStruct);SAI_InitStruct.SAI_AudioMode = SAI_Mode_SlaveTx;SAI_InitStruct.SAI_Synchro = SAI_Asynchronous;SAI_InitStruct.SAI_Protocol = SAI_Free_Protocol;SAI_InitStruct.SAI_FirstBit = SAI_FirstBit_MSB;SAI_InitStruct.SAI_ClockStrobing = SAI_ClockStrobing_RisingEdge;SAI_InitStruct.SAI_DataSize = SAI_DataSize_16b;SAI_InitStruct.SAI_FIFOThreshold = SAI_Threshold_FIFOEmpty;SAI_InitStruct.SAI_OUTDRIV = SAI_OutputDrive_Disabled;SAI_Init(SAI1_Block_A, &SAI_InitStruct);EDIT and UPDATE:For fucked snakes! It turned out, that the audio test data I've had in the FLASH memory had somehow crapped out. It was configured correct, however test data pattern was bad.
STM32 SWO pin isolation from SDMMC data line - Page 1
Forum section: electronics / projects

author: ricko_uk
author_rank: Super Contributor
timestamp: November 15, 2024, 08:44:50 pm
content: Hi,I am using a STM32U5G9VJT6Q and I would like to enable the SWO signal on the SWD connector, but one of the SDMMC data pins is already using that line.To avoid creating a long stub on the SDMMC bus leading to the SWD connector—which could cause line reflection issues due to the potentially high speeds of the SDMMC—I’m considering isolating the connection to the SWD connector with a resistor. This would allow the SDMMC line to be directly connected to the microcontroller while the signal to the SWD connector is "isolated" through the resistor.A resistor with too high a value might degrade the SWO signal (?). Could you recommend an appropriate resistor value that ensures reliable SWO operation?Additionally, what are the best practices in this situation? For example, would implementing line termination at the SWD connector side be advisable?Thank you!

author: ataradov
author_rank: Super Contributor
timestamp: November 15, 2024, 11:49:33 pm
content: Given the conflict, you are not going to use SDMMC and SWO at the same time, so just put a 0 Ohm resistor that you can populate when using SWO and remove normally.

author: thm_w
author_rank: Super Contributor
timestamp: November 16, 2024, 12:39:27 am
content: I think SWO frequency depends on the SWD frequency which is settable right? So it shouldn't be a major issue unless you are worried about long programming times.Typically 2MHz but could be as high as 40MHz, depending on your part and what you want to use it for.I would throw in 1k and see how that looks on the scope.

author: ataradov
author_rank: Super Contributor
timestamp: November 16, 2024, 12:53:56 am
content: SWO frequency is independent and is pre-scaled from the core clock. And usually it is quite low. But the issue is not SWO, the issue is long stubs on the SDMMC, which is fast and needs decent signal integrity. Whether this stub will be an issue - I don't know, and I kind of doubt it. But if it is a concern, then 0 Ohm link is a good solution. It can be populated for development and removed on production units.This does not sound like a real problem.

author: thm_w
author_rank: Super Contributor
timestamp: November 16, 2024, 02:14:49 am
content: Quote from: ataradov on November 16, 2024, 12:53:56 amOh I didn't mean SWO was the problem, just thinking the highest reasonable resistor value that would still pass the SWO signal. So the resistor could be left in place.Though as you say it should never be needed for production anyway.

author: ricko_uk
author_rank: Super Contributor
timestamp: November 16, 2024, 08:39:37 pm
content: Thank you all.I was trying to avoid doing that but yes, I think it might be the safest solution.Thank you
STM32 timer interrupt issue - Page 1
Forum section: electronics / projects

author: hussamaldean
author_rank: Unknown
timestamp: October 12, 2018, 02:57:07 pm
content: Hi allI am currently learning STM32 and I reached timer interrupt section and I am applying the examples from this pagehttp://docs.leaflabs.com/static.leaflabs.com/pub/leaflabs/maple-docs/latest/lang/api/hardwaretimer.html#lang-hardwaretimer-setoverflowthe first one works just fine but the second one which is the followingQuotebut I am getting the following error during compiling the codeQuoteanyway to fix this problem ?regards

author: exe
author_rank: Unknown
timestamp: October 12, 2018, 03:09:54 pm
content: I see there are several problems. One is timer3 and timer4 are already defined. Probably, you don't need to create them.Other errors are about, probably, changed API and macroses (e.g. BOARD_BUTTON_PIN) which are not defined (or you have to define yourself, I dunno).I'd advise to learn C/C++ first and read errors and warning more carefully as these error are very common and it's essential to understand them to make any progress in writing own firmware.

author: hussamaldean
author_rank: Unknown
timestamp: October 12, 2018, 03:26:47 pm
content: Quote from: exe on October 12, 2018, 03:09:54 pmI've tried that approach and it didn't work at all

author: exe
author_rank: Unknown
timestamp: October 12, 2018, 04:03:10 pm
content: Which approach? What was the problem?

author: hussamaldean
author_rank: Unknown
timestamp: October 12, 2018, 04:07:25 pm
content: Quote from: exe on October 12, 2018, 04:03:10 pmafter looking in the header files of STM32 in Arduino15 folder, it turns out that timer is already defined in the headers and I must change itwell, I was dump not to check the header files first before posting this problemat least I learnt something new though
STM32 to control 4-lanes DSI display? - Page 1
Forum section: electronics / projects

author: ricko_uk
author_rank: Super Contributor
timestamp: October 27, 2024, 02:23:46 am
content: Hi,I am looking for an STM32 micro that can control the DSI display in the attached datasheet. That display has 4-lanes DSI interface but cannot seem to find any STM32 with 4-lanes DSI. The microcontroller selector tool only has "MIPI-DSI" option without lane specification and all the micros I looked at so far seem to have only 2-lanes.- Does anybody know if there are any STM32 micros with 4-lanes DSI?- If not, how would you control such display? Are there some bridges ICs (I could not find any)?Thank you

author: Postal2
author_rank: Frequent Contributor
timestamp: October 27, 2024, 04:31:51 am
content: You are very lazy in your search.https://pcbartists.com/design/embedded/using-4-lane-mipi-dsi-display-with-stm32-2-lane-dsi-host/https://pcbartists.com/design/embedded/parallel-rgb-to-mipi-dsi-design/

author: ricko_uk
author_rank: Super Contributor
timestamp: October 29, 2024, 05:18:53 pm
content: Thank you Postal,I saw the first link but it mentioned the resolution limitation and the display I am using is 800x800.I did not come across the second link though.Thank you
STM32 Vbat pin setup  - Page 1
Forum section: electronics / projects

author: unscripted
author_rank: Contributor
timestamp: October 06, 2022, 11:30:11 pm
content: I recently found this setup for the battery pin of the STM32L476 (see attached). It's simplified just to show the connections of Vbat pin. I wonder if this setup right. Shouldn't VBAT pin be connected to 3.3V_bat net instead of directly connected to the battery? The 3.3V_bat net is also used to power some minor backup circuit. I did not find information on the MCU having internal reverse polarity protection. What would happen if one mistakenly connect a battery in reverse and 3.3V is there? It may cause some unwanted behavior in the MCU.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 07, 2022, 03:45:23 am
content: I guess the idea was to not draw current from the coin cell when Vdd is present?If so, yes, as it is shown it's useless as the 3.3V_bat isn't connected to anything. At least anything shown on this piece of schematic.But also, if this was the goal, the whole idea itself is useless anyway. The STM32L4 series does not draw any significant current from the VBAT pin when Vdd is present. It only goes in VBAT mode when Vdd does not power the MCU (and even in this case it only draws ~300 nA). So there's nothing external to add.Now if the goal was actually something else (since we don't see where 3V_bat goes), anything goes.
STM32 with Ethernet and USB_OTG_HS at the same time? - Page 1
Forum section: electronics / projects

author: Pack34
author_rank: Frequent Contributor
timestamp: May 09, 2016, 08:28:37 pm
content: I'm looking at prototyping a new circuit. I'd like to add Ethernet support to an existing design that relies on sending large amounts of data over USB. As an alternative to the USB interface I'd like to add Ethernet support. So that the board can receive configuration commands and reply with a couple kb of sensor data periodically.Just to be sure that there would be no pin conflicts, I'm running some chips through STM32CubeMX and I'm seeing conflicts with the USB_OTG_HS and ETH lines on every chip I've tried.I'd like to use an RMII interface to an external LAN8720 PHY to handle the Ethernet. But this kicks out the ability to do high-speed USB. I really need the throughput over USB to send the 2kb of sensor data as fast as possible through DMA. I know I can't do it that fast over Ethernet but I can take the hit of only being able to take a couple samples a second through the Ethernet interface.Is there an STM32 chip that can do this? Or is my project a non-starter?

author: Pack34
author_rank: Frequent Contributor
timestamp: May 09, 2016, 08:32:35 pm
content: Strike that. It looks like I had a filter on it for the 100pin packages. It looks like I can do what I want but I'm going to have to jump up to the 144pin versions. I'm going to leave this up just in case someone else has the same question.
STM32F1 LSE Crystal External Caps - Page 1
Forum section: electronics / projects

author: ipek.grgc
author_rank: Contributor
timestamp: October 11, 2019, 01:44:58 pm
content: Hello everyone!I am designing a board with STM32F1 on it. In its oscillator design guide Rev 11 there are recommended 32 kHz crystals and i have decided to use "FC-135" from that recommendation list. It has a load capacitance value of 6pF. CLis 6pF and Csis taken into account as a value between 7pF to 10pF. According to this formula: CL1= CL2= 2(CL- Cs) the resulting capacitance value for external caps appear to be negative since the load capacitance of the 32kHz crystal is small. What does this mean? Am i calculating something wrong?

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: October 11, 2019, 02:57:46 pm
content: In the first sentence in section 3.3, Cs is defined as the stray capacitance of the pcb and connections, not series capacitance. If strays are as high as 10pF, your crystal is too far away from the MCU.

author: ipek.grgc
author_rank: Contributor
timestamp: October 11, 2019, 03:36:41 pm
content: Thank you for your replyI was trying to do the worst case estimation for the stray capacitance value, that's why i take that in to account as 10pF. What would the stray capacitance be in a good designed PCB? Even if i say its 5pF, the calculated external capacitor values would be 2pF. Do i need to put external caps when their values are this small?

author: jhpadjustable
author_rank: Frequent Contributor
timestamp: October 11, 2019, 05:14:43 pm
content: That's high. Arule of thumbfor 50 ohm impedance-controlled traces on FR-4 is about 3.3pF/in. If my math is correct, a 0.25mm wide trace on FR-4, surrounded by copper 0.5mm away from all edges, with nothing on the other side of the board, has roughly 50fF/mm of parasitic capacitance. So I just put 5.6pF load caps on and hope for the best.You can tune the error out, if you really need to (seeST AN2604for details).Disclaimer: signal integrity isn't my specialty, not even close.
STM32F103C8T6 (blue pill) PCB board, looking for feedback - Page 1
Forum section: electronics / projects

author: siyar
author_rank: Contributor
timestamp: February 14, 2025, 10:45:13 am
content: Hi im new at PCB-design. This is my first MCU board. The board consists of I2C, UART, SW, USB, HSE (16Mhz).I attached my project files.Im looking for some feedback.Thank in advance!

author: Doctorandus_P
author_rank: Super Contributor
timestamp: February 14, 2025, 11:12:01 am
content: What is the goal of this project?For a "generic development board" I would not use the STM32F103 anymore, or at least break out more pins so they can also be used for other (similar) projects.It's also not a project that is attempted to be small or compact. The generic "blue pill" boards in DIP form format is much more universal, and there are also some re-created PCB's for this board on Github. WeAct appears to be a quite reliable shop on Aliexpress, and the've got several more modern development boards.If this is just for getting some practice in PCB design, it looks quite good, except for the routing around the crystal. Spend some time about peculiarities for designing in a crystal on a PCB.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: February 14, 2025, 11:38:00 am
content: Don't put vias in the ground pad of the 3.3V regulator like that. It'll make soldering a pain because the solder will want to wick down the vias. You have room to move them down.You don't need those vias to ground on the ground pins of your UART, SW, and I2C headers. These pin through-holesareessentially vias, and should already be connecting to the ground plane on the bottom layer.

author: siyar
author_rank: Contributor
timestamp: February 14, 2025, 12:58:51 pm
content: Hi ty for the answer. The goal was to practice PCB design. Ill look into the routing around the crystal

author: siyar
author_rank: Contributor
timestamp: February 14, 2025, 01:00:08 pm
content: Hi, thank you for the tip!

author: siyar
author_rank: Contributor
timestamp: February 14, 2025, 01:30:01 pm
content: Is this better?

author: PGPG
author_rank: Frequent Contributor
timestamp: February 14, 2025, 05:40:12 pm
content: Quote from: siyar on February 14, 2025, 01:30:01 pmSee Fig 14 at page 46:https://www.st.com/content/ccc/resource/technical/document/application_note/c6/eb/5e/11/e3/69/43/eb/CD00221665.pdf/files/CD00221665.pdf/jcr:content/translations/en.CD00221665.pdfIt is how they imagine it should be done (you have there 2 crystals).I have never did it that way. I was always doing it rather like you did it and noticed no problem with it. But I was never using STM32.I will be doing it (with STM32) in month or two and will be seriously considering it. I will probably not make a cut in bottom layer as they do. If I will be using 4 layer PCB I suppose I will make cut at one GND layer and left full GND at second GND layer. But I can't say nothing for sure as it is future.
STM32F3 SDADC fast configuration - Page 1
Forum section: electronics / projects

author: koprivecj
author_rank: Newbie
timestamp: October 05, 2017, 12:58:03 pm
content: Hello everyone!I'm working on the project with an STM32F373 microprocessor. I'll use SDADC-s on it and I will multiple times change their configurations during measurement so that this should be as fast as possible. So my question is how long does it take for this kind of ADC from a stop, change configuration and restart to get an accurate result from it.If anybody has that kind of experience I would appreciate your help.
STM32F303 max usable dual ADC speed? - Page 1
Forum section: electronics / projects

author: erikka
author_rank: Regular Contributor
timestamp: June 19, 2024, 12:36:24 pm
content: Has anyone here ever tested the max dual non interleaved ADC speed for a STM32F303 or similar MCU which still allows continuous power calculation or subsampling with anti aliassing to work?
STM32F4 + OV7670 Camera + ILI9163 LCD - Page 1
Forum section: electronics / projects

author: pyrohaz
author_rank: Regular Contributor
timestamp: June 24, 2015, 09:21:50 pm
content: Hey guys,I'm having a go at testing an OV7670 sensor with my STM32F4 discovery board. Now I know this board has DCMI but whats the fun in using that! I'm using EXTIs to capture the VSync and HSync edges, along with the pixel clock and storing every pixel in a 16bit array (pixel output is RGB565). I can sync to the image just fine, the problem comes with the colour output. The colour seems completely wrong, I can't really see why either so I'll post some images and if anyone could help with what the problem could be, I'd be greatly appreciative!Cheers,

author: nctnico
author_rank: Super Contributor
timestamp: June 24, 2015, 09:30:18 pm
content: Are you sure the camera module isn't outputing YUV format?

author: pyrohaz
author_rank: Regular Contributor
timestamp: June 24, 2015, 09:58:40 pm
content: Quote from: nctnico on June 24, 2015, 09:30:18 pmAccording to COM15 and COM7, I should be outputting RGB565.

author: Yansi
author_rank: Super Contributor
timestamp: June 24, 2015, 10:09:38 pm
content: What's the fun of not using DCMI? I don't get it. Wouldn't you rather use arduino? That also does not have DCMI.

author: pyrohaz
author_rank: Regular Contributor
timestamp: June 25, 2015, 01:00:19 am
content: Quote from: Yansi on June 24, 2015, 10:09:38 pmI'm doing it more so as a learning exercise on how cameras output data, along with the methods of synchronising with them. Using DCMI would involve writing a few registers and seeing the data magically appear in a DMA'd array. While that's learning how to program the STM32 architecture, it doesn't teach me much about cameras.

author: miguelvp
author_rank: Super Contributor
timestamp: June 25, 2015, 02:32:48 am
content: You might be getting the data backwards or placing it backwards into the buffer.So on the first byte you get R4,R3,R2,R1,R0,G5,G4,G3 and on the 2nd byte you get G2,G1,G0,B4,B3,B2,B1,B0but if you use the wrong endian in memory it's going to swap:G2<->R4G1<->R3G0<->R2B4<->R1B3<->R0B2<->G5B1<->G4B0<->G3

author: amyk
author_rank: Super Contributor
timestamp: June 25, 2015, 11:56:26 am
content: Make sure the LCD controller is set to the right pixel format.It also looks like the blue channel is completely missing.

author: Yansi
author_rank: Super Contributor
timestamp: June 25, 2015, 06:06:02 pm
content: Quote from: pyrohaz on June 25, 2015, 01:00:19 amOK, legit enough... Some time ago, I have written a DRAM driver for AVR chips.Sorry for the distraction, just wandered the reason...

author: aseok
author_rank: Contributor
timestamp: June 25, 2015, 07:18:42 pm
content: HelloMy problem was solved, unfortunately it was related to stm32cubef4 software package.Thanks.
STM32F407 USB HID receive HID Out Reports - Page 1
Forum section: electronics / projects

author: SreejitS
author_rank: Contributor
timestamp: September 26, 2016, 10:27:14 am
content: Hello everyone!I wanted to whether or not it is possible to get the OUT report descriptors ie. from Host to Device , using stm32f4 as a custom HID device. AFAIK usb device can send data only in one direction except in few stages during enumeration.Currently i am able to send data from stm32f4 to host.

author: amyk
author_rank: Super Contributor
timestamp: September 26, 2016, 10:59:01 am
content: Quote from: SreejitS on September 26, 2016, 10:27:14 amNo, USB is host-polled but a bidirectional bus... if you have your USB peripheral configured correctly you should be able to implement any type of device.

author: newbrain
author_rank: Super Contributor
timestamp: September 26, 2016, 01:27:18 pm
content: USB HID devices can receive OUT reports.A classical example is the control of the LEDs on a keyboard.See the attached image from:Device Class Definitionfor Human InterfaceDevices (HID)Firmware Specification—6/27/01

author: SreejitS
author_rank: Contributor
timestamp: September 26, 2016, 02:07:53 pm
content: @newbrainThanks a lot for confirming it....Now I'll be digging into source code of STM32F4 HAL HID device driver and try to figure it out.....my previous such attempt failed as i was not sure whether its possible in first place.I will keep this thread updated .

author: SreejitS
author_rank: Contributor
timestamp: October 03, 2016, 08:28:52 pm
content: Hello everyone!I am pleased to tell that i've finally figured it out.These links were helpful.http://www.stm32cube.com/article/50http://henryomd.blogspot.in/2016/07/usb-hid-on-stm32f042.htmlI am attaching the code for your convinience.Feel free to post more for further clarifications

author: grantb5
author_rank: Regular Contributor
timestamp: August 22, 2025, 05:54:08 pm
content: Thank you!Although I did not usewww.stm32cube.com/article/50, it is still available on the Wayback machine. Your two source files helped immensely. I an using it to get the HID Keyboard LEDs using a CubeMX generated HAL project for HIDExample.Keywords that may help others: stm32 USB SET REPORT out LEDs
STM32F446 and CS42448 audio processor - Page 1
Forum section: electronics / projects

author: mark86
author_rank: Newbie
timestamp: January 13, 2018, 05:41:57 am
content: I'm just trying to workout if this is possible or if there's something I'm missing. Lots of this will be a fairly steep learning curve for me which is one of the main reasons for the project.The original plan was to be able to take a PCM audio input via S/PDIF (from TV) then feed it through a few digital filters (crossover, volume control, maybe EQ) and into an audio DAC to drive an amplifier and set of two way active stereo speakers and subwoofer. This would need 5 channels of DAC or 7 if a centre channel was also added. It could also be configured for 5.1 (or 7.1) output if the STM32 wasn't providing the crossovers for the front speakers. I'm only really interested in driving front stereo speakers at the moment.Current plan is:STM32F4462 x S/PDIF input, digital filters (crossover, possibly some EQ), HDMI CEC for volume control from TV, 4x20 charactor LCD, rotary encoder with push button for volume control and input selection, some kind of output to power up power amplifiers.CS424488 channels of audio output, 4 channels of input, digital volume control. Interfaced with the STM32 using 2 x SAI in TDM mode and SPI for control.Raspberry PIA RPI GPIO header would be included on the board. This would allow the possibility for a RPI to be added which would interface to the STM32 via SPI and UART. STM32 could feed an AC3/DTS/whatever format stream via SPI to the RPI which would decode it using FFmpeg (or similar) then feed a multi channel PCM stream back to the STM32 to be fed into the digital filters.The main reason for this post is to make sure I'm not overlooking anything. I'm in the process of schematic and PCB design which I'll post here if I don't give up before they're finished.
STM32F4Discovery stucks in SysTick_Handler  - Page 1
Forum section: electronics / projects

author: syntax333
author_rank: Regular Contributor
timestamp: January 20, 2020, 04:54:19 am
content: Hi, I got a STM32F4Discovery(stm32f407vgt6) kit which I use to compute some matrix multiplication. It computes matrices perfectly (took approx. 80us) but after computing 12 times it stucks in that function. When I stop debugging I see that it stucks in:"startup_stm32f407xx.s" lineSysTick_Handler PROCEXPORT SysTick_Handler This line >> B .ENDPI tried a program which switches LED on/off. However, after some time stm32 stucks at same place no matter the code. Has anyone encountered this type of problem?I am using Keil uvision to create my projects template etc.

author: HackedFridgeMagnet
author_rank: Super Contributor
timestamp: January 20, 2020, 05:16:43 am
content: Do you have a SysTick_Handler function in C or asm?else maybe a watchdog?

author: emece67
author_rank: Frequent Contributor
timestamp: January 20, 2020, 09:13:05 am
content: .

author: syntax333
author_rank: Regular Contributor
timestamp: January 20, 2020, 04:46:25 pm
content: I was able to disable it with "SysTick->CTRL = 0; ". However, I got a question is SysTick counter or interrupt important to clock/stm32 functions or project? is it essential? What do I lose disabling it?

author: djacobow
author_rank: Super Contributor
timestamp: January 20, 2020, 05:35:40 pm
content: This is highly Googleable. Systick is a cpu register that decrements every cycle. When it gets to zero, it can cause an interrupt, which you can use to effectively increase the size of the counter to whatever you need.It is useful for timing things relative to the cpu clock. For example, you can read it before and after a function to see how long it took.Interestingly, this is part of the arm core, not a proprietary peripheral. Any arm chip will have it.

author: langwadt
author_rank: Super Contributor
timestamp: January 20, 2020, 05:44:33 pm
content: Quote from: djacobow on January 20, 2020, 05:35:40 pmThat is because it is commonly used for scheduling an OS
STM32F7E Discovery Board and Audio Codecs, Getting Started - Page 1
Forum section: electronics / projects

author: jspill23
author_rank: Newbie
timestamp: October 26, 2017, 04:23:11 pm
content: Hello all,I am wanting to build a digital guitar effect board that uses the STM32F7E discovery board as the brains of the project. I was running through the manuals and having a tough time on how the audio codecs parameters are set up. Does this happen through the I2C communication, or does it have dedicated GPIOx pins for this. I am new to CMSIS so I am trying to understand the drivers but do not understand them.