hybridfree/eevblog-posts huggingface dataset:
Anyone have experience with inexpensive Flashchip FCM32F103 microcontrollers? - Page 1
Forum section: electronics / general

author: globoy
author_rank: Frequent Contributor
timestamp: May 09, 2024, 07:49:17 pm
content: I'm looking to see what development environments can be used (e.g. can they be used in Keil uVision or STM32CubeIDE) and if their USB port can be used for programming and/or as a USB CDC class serial port by code running on the chip (CDC serial is most important).They are nicely inexpensive at LCSC. For example 0.80USD for 1:https://www.lcsc.com/product-detail/Microcontroller-Units-MCUs-MPUs-SOCs_Flashchip-Microelectronics-FCM32F103C8T6_C3151837.htmlSo far I haven't found an english spec for the part but they're definitely STM32 knock-offs with some kinda neat features such as 5V operation (power by USB w/o regulator?) and a Cortex M4 core.
Additional high res. PWMs by using Configurable Logic Cell (CLC) block? - Page 1
Forum section: electronics / general

author: jm_sanz
author_rank: Contributor
timestamp: May 06, 2024, 10:14:53 am
content: Good morning,I am in the design phase of a SMPS GaN based that will operate at around 1MHz with many four-switch Buck-Boost (FSBB). Most of the MCUs for this kind of applications only have 8 pairs of high res. PWM (around 150ps) but I need more. Having an MCU with more high res. outputs increases its price significantly.I have thought of using the “Configurable Logic Cell (CLC)” that many of these microcontrollers have for generating complementary outputs and only using one pair for every full-bridge thanks to some logic.I found an Application Note from Microchip Technologies that talks about this possibility in Fig. 11.https://ww1.microchip.com/downloads/en/AppNotes/00002133a.pdfdsPIC33CK include this block:https://ww1.microchip.com/downloads/aemDocuments/documents/MCU16/ProductDocuments/DataSheets/dsPIC33CK1024MP710-Family-Data-Sheet-DS70005496.pdfWhat do you think about this possibility for high frequency application? Feasable?. I am afraid about possible delays this block could produce but cannot see why it would not work.Best regards,Miguel.

author: JPortici
author_rank: Super Contributor
timestamp: May 06, 2024, 11:45:27 am
content: Hi,check the device datasheet. You can't use just any peripheral signal with CLC (see the CLCxSEL register!)Altough, it might be possible to take one of the HSPWM with PPS output and route to CLCINx via virtual connections, but i don't have a device at hand to test if it works. Even if it worked, only PWM4 can be routed through PPS in the dsPIC33CK2556MP508 family.I couldn't find timing specifications for the CLC, so additional delays are not characterized.If you can live with some channel at lower frequency PWM, remember that you have 8 pair of HSPWM + 1 MCCP (which can do full bridge/deadtime) + 8 SCCP (which require CLC trickery to achieve full bridge/deadtime)
What 8-pin MCU might this be ? - Page 1
Forum section: electronics / general

author: MathWizard
author_rank: Super Contributor
timestamp: May 02, 2024, 11:11:46 am
content: I have an RGB LED strip controller, that had an IR remote control. And the label of the 8-pin SIOC MCU was etched off. There's an EEprom next to it, so I would assume they would use the default I2C pins on the MCU, with the EEPROM.But I'm just wondering what might have this pin out. I barely know ATMEL MCU's, but this might be a PIC type ?1-Vcc2-SCL3-SDA4,5,6,7, GPIO8-GND

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: May 02, 2024, 11:32:46 am
content: Most likely a cheap Chinese job like the Padauk PMS150- these are be pin-compatible with PIC12

author: MathWizard
author_rank: Super Contributor
timestamp: May 02, 2024, 11:45:48 am
content: I should leave it alone for now, I'd probably have to download a bunch of other software/etc. I just wanted to see what the program on it might look like. Somewhere I have the remote too. The LED's were thrown out years ago.But yeah I could just make some strings of LED's for it, and it should all still work. And I want to see how the remote works and sends data. But I've never tried anything with a PIC before.

author: zilp
author_rank: Frequent Contributor
timestamp: May 02, 2024, 12:41:24 pm
content: Quote from: MathWizard on May 02, 2024, 11:11:46 amChances are this is a Padauk. In which case, nothing was etched off, they just tend to be labeled on the bottom side. You'd have to desolder it to check ...

author: radiolistener
author_rank: Super Contributor
timestamp: May 02, 2024, 02:10:10 pm
content: If this is some cheap Chinese LED controller, then most of all this is some kind of Chinese controller probably something 8051 based with one-time programable memory, they don't use branded MCU in a cheap mass production devices due to higher price. Even if some device contains branded MCU, they will replace it with more cheap Chinese one for economy
STM32F407 - CMSIS DSP - IFFT not working with audio input/output - Page 1
Forum section: electronics / general

author: lukegalea16
author_rank: Newbie
timestamp: April 28, 2024, 09:22:20 pm
content: I'm currently using the stm32f407g-disc1 and reading an audio input through PMOD I2S2. I've carried out some examples and the hardware is working fine (writing data from the rx to the tx buffer) such as the code below.Code:for (int i=0; i<BUFFER_LENGTH*4; i=i+4) {txBuf = rxBuf;txBuf[i+1] = rxBuf[i+1];txBuf[i+2] = 0;txBuf[i+3] = 0;}I now wish to perform the FFT on this incoming buffer, manipulate it (my first aim is to implement a pitch shifting algorithm) and perform the IFFT again. Thus I've tried the following:Code:for (int i=0; i<BUFFER_LENGTH*4; i=i+4) {fft_in_buf = (float) ((int) (rxBuf<<16)|rxBuf[i+1]);fft_in_ptr++;}arm_rfft_fast_f32(&fft_handler, fft_in_buf, fft_out_buf, 0);arm_rfft_fast_f32(&fft_handler, fft_out_buf, fft_in_buf, 1);fft_in_ptr = 0;for (int i=0; i<BUFFER_LENGTH*4; i=i+4) {txBuf = (fft_in_buf >> 16) & 0xFF; // MSBtxBuf[i + 1] = fft_in_buf & 0xFF; // LSBtxBuf[i + 2] = 0;txBuf[i + 3] = 0;fft_in_ptr++;}In the main initialization I'm also carrying outCode:arm_rfft_fast_init_f32(&fft_handler, BUFFER_LENGTH);My issue is that I get a very very low output (barely audible) with the above code. I might have a scaling issue as I found in similar issues but I still can't get it to work by scaling fft_in_buf.

author: newbrain
author_rank: Super Contributor
timestamp: April 29, 2024, 12:57:33 pm
content: I don't have a direct answer, but rather some questions, that might guide you to a solution:Are you getting the input data from one of the STM32F407 SAI interfaces?What's the format of the audio stream?If using SAI, what's the purpose of manipulating the byte order?SAI data will come correctly aligned for the CPU to handle (Little Endian), and if the "LSb/MSb first" bit in SAI configuration is wrong, well, changing byte order won't help.What are the types of the used buffers?The int -> float and float -> int conversions both look really fishy: the sign is not kept in the first one, and the second one is not even possible, since floats cannot be shifted; moreover, you are shifting by 16 position instead of 8...

author: lukegalea16
author_rank: Newbie
timestamp: April 30, 2024, 06:20:37 am
content: Hi,my issue was converting back the tx bufferCode:for (int i=0; i<BUFFER_LENGTH*4; i=i+4) {txBuf = (fft_in_buf >> 16) & 0xFFFF; // MSBtxBuf[i + 1] = fft_in_buf & 0xFFFF; // LSBtxBuf[i + 2] = 0;txBuf[i + 3] = 0;fft_in_ptr++;}
Dumped a 64mbit rom, any idea where to go from here? - Page 1
Forum section: electronics / general

author: AJRube
author_rank: Contributor
timestamp: April 29, 2024, 09:45:31 am
content: Hey folks.A couple of years ago I made a silly mistake and purchased some mask roms not realising that they were not writable - definitely the sort of mistake you only make once. When the chips arrived, I stashed them away, purchased some proper Flash roms and called it a day.More recently, I got curious about what was on them, so I dumped the contents with an Xgpro reader... I think successfully? But I'm not exactly sure.The chips in question are Macronix 23C6410MC's - a 64mbit mask rom - in a SOP44 package -https://www.mxic.com.tw/Lists/Datasheet/Attachments/8177/MX23C6410,%205V,%2064Mb,%20v3.1.pdfMy assumption is that they are some sort of audio data, as they are stamped with Roland all over them, but I've tried various attempts at working out exactly what kind with no success (mostly trying out different encodings like FCE-DPCM or assuming they're PCM data, and running it through Audacity to see if I get anything resembling sound waveforms).Does anyone have any ideas on how to get an idea of what the contents of the rom actually is?I've attached a picture the beginning of the hex dump for reference - I have pored through the full 8mb worth of data for anything resembling even a hint and come up empty, no strings that look like anything vaguely user readable.Thanks!

author: RoGeorge
author_rank: Super Contributor
timestamp: April 29, 2024, 09:53:39 am
content: Might be MIDI soundfonts, as upgrades/addons for MIDI keyboards and/or sound cards. If they are soundfonts, they are under copyright, so they might be expensive enough to worth selling them.

author: AJRube
author_rank: Contributor
timestamp: April 29, 2024, 10:52:32 am
content: ah, I hadn't thought of that, good call. 64mbit is quite a lot for a soundfont I would have thought though!Either way, I was mostly wanting to try and actually identify what's on them. I'm utterly stumped. Usually when I dump a chip I at least get some user readable strings in it, this one has nothing.
Looking for information on TEST pin and ways to DUMP mask ROM of PIC1650 PIC16xx - Page 1
Forum section: electronics / general

author: reverse
author_rank: Contributor
timestamp: April 29, 2024, 06:31:41 am
content: Hi. Looking for information on TEST pin and ways to read out the mask firmware ROM on GI's (General Instrument) PIC1650A (PIC16xx) family of microcontrollers.

author: woofy
author_rank: Frequent Contributor
timestamp: April 29, 2024, 09:23:21 am
content: The only info on the test pin I have says "Test input not normally used".

author: jpanhalt
author_rank: Super Contributor
timestamp: April 29, 2024, 09:34:56 am
content: Interesting read (link #1). Link #2 might help. I did not go through the whole thing.https://www.eejournal.com/article/a-history-of-early-microcontrollers-part-9-the-general-instruments-pic1650/http://bitsavers.org/components/gi/PIC/1983_PIC_Series_Microcomputer_Data_Manual.pdfWhat tools to you have to read it?EDIT: Its program ROM is only 512 12-bit words. Do you know what the chip actually did? If so, it might be faster and easier just to write a program to do the same on a more modern chip.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 29, 2024, 09:59:53 am
content: Quote from: jpanhalt on April 29, 2024, 09:34:56 amOr decap and read it optically
Incorrect current measusrement of BLDC motor using ADC - Page 1
Forum section: electronics / general

author: jeet55
author_rank: Contributor
timestamp: April 24, 2024, 12:58:14 pm
content: I am controlling a BLDC motor using drv8301 and stm32, using trapezoidal control,and taking position feedback using backemf using 3 opamps and current feedback using the drv's built in opamp.Currently I am not measuring current by cycle by cycle basis of pwm but taking the average of the rectangle of pwm's as a whole.I have configured adc sampling rate high enough to take multiple sample per cycle of pwm so we don't have to worry about that.what problem I am facing is I assumed the current average to give me the phase current but the reading is off by a lot, when duty cycle is close to 100% the current reading is close to the actual but its incorrect and larger than actual current when duty cycle is low.so I have to multiply the current average to the duty cycle to get a correct value. this doesn't make sense to me.What I am missing here? maybe its obvious help me out here!

author: Siwastaja
author_rank: Super Contributor
timestamp: April 27, 2024, 04:38:33 pm
content: Without seeing a schematic, I would guess it's the usual case: current is only flowing through the shunt resistor during the PWM ON-time. If you synchronize the measurement during on-time and assume the current stays constant during the whole switching period (which is fair assumption given high enough f_sw compared to motor inductance), then you know the true motor current; because it is also flowing during OFF-time, you are just not measuring it.But if you sample randomly (and remember to take enough samples for correct average, at least tens of samples per period!), you are also reading zero during OFF time, when in reality current is flowing in the motor. In such case, you need to multiple by the reciprocal of duty cycle.But the best idea is to synchronize the ADC, take many samples during on-time, and average them. Assuming enough load so that motor runs in CCM, then the same average is very closely true also during OFF-time. If you can only have one sample, take it at exactly the midpoint of ON-time, and you - theoretically - again have true average motor current, in CCM.
Reset esp8266 when alarm circuit path *broken* with minimal power draw at rest - Page 1
Forum section: electronics / general

author: puterboy
author_rank: Regular Contributor
timestamp: April 22, 2024, 01:34:40 am
content: I am using an esp8266 to monitor the continuity of a loop of wire (for an alarm).When the loop is cut, I want to awaken the esp8266 from deep sleep and process the alarm signal.I want to minimize power drain during the deep sleep phase to preserve battery power.Note that the esp8266 typically awakens by driving RST low (e.g., grounding it) to create a HI->LOW transition.Basicaly I need something to "invert" the signal so that cutting (i.e, interrupting) the signal will create an output that acts as a "sink" and drives RST low.Using a pulldown resistor alone will surely draw too much current at rest.Other choices I have considered are:- One-shot/Monostable chip?- Microcontroller?- Discrete transistor circuit?- MOSFET circuit? (with one end of loop grounded and the other end going into the GATE with high value resistor to VCC and RST attached to SRC with DRAIN grounded so that when loop is broken, gate is pulled high and and source is driven low)Note total loop resistance itself is about 50-60 ohms (it's a 200ft+ loop of thing gauge wire)So what circuit & components would you recomend so that current draw is minimized when monitoring loop before cut?

author: CountChocula
author_rank: Unknown
timestamp: April 23, 2024, 05:14:13 pm
content: I wouldn't discount the pull-up route altogether, at least without a bit of experimentation. You can use a very high value resistor and end up with negligible current use.

author: langwadt
author_rank: Super Contributor
timestamp: April 23, 2024, 05:45:36 pm
content: Quote from: CountChocula on April 23, 2024, 05:14:13 pma very high value resistor would likely make it noise sensitive

author: Kasper
author_rank: Frequent Contributor
timestamp: April 27, 2024, 04:18:58 am
content: I've used a mosfet for a few similar circuits.Do you really just need to drive reset low or do you need a pulse: high -> low -> high?If you need a pulse, an RC delay and 2 mosfets can do it.
Identify MCU - Page 1
Forum section: electronics / general

author: juffe
author_rank: Newbie
timestamp: May 06, 2024, 10:40:29 am
content: How I can identify this mcu? I think so that it is cortex m0? But what version? And what is pinout?Text top of mcu is NM002 2246. There was also sticker top of mcu 4C56WT 12842K.PCB is from laser distance meter. Chinese one.

author: abraxalito
author_rank: Contributor
timestamp: May 07, 2024, 02:44:43 am
content: The rather unusual 10pin package makes me think its a Puya PY32F002 in MSOP10. Which is indeed a Cortex M0+. Oh but did you mean the square package in the 2nd pic?

author: mon2
author_rank: Frequent Contributor
timestamp: May 07, 2024, 03:20:26 am
content: The msop10 packaged device is a PLL with m5351A (clone of the si5351a). Datasheet of the clone is on lcsc.com.

author: juffe
author_rank: Newbie
timestamp: May 08, 2024, 10:32:07 am
content: I mean mcu on second picture square 32pin, first picture is before I remove sticker from top of the mcu

author: gamalot
author_rank: Super Contributor
timestamp: May 08, 2024, 10:39:57 am
content: I saw an article by a Chinese engineer about the reverse engineering of this distance meter, and he couldn't guess what model the MCU was.

author: pcprogrammer
author_rank: Super Contributor
timestamp: May 08, 2024, 10:43:21 am
content: Try to draw up a schematic and identify the power pins on the 32 pin QFN package. That might help in figuring it out, but it could be a custom part.

author: IOsetting
author_rank: Regular Contributor
timestamp: May 08, 2024, 11:34:39 am
content: Someone already disassembled this laser meter but neither he can identify this nm002 chiphttps://mbb.eet-china.com/tech/t5/160767.htmlIn case you can not login to view the content, I attached the screencap of the translated page

author: m k
author_rank: Super Contributor
timestamp: May 08, 2024, 12:54:47 pm
content: GND at pin 14 is not usual, maybe ColdFire V1.
Controlling LED with a button - Page 1
Forum section: electronics / general

author: Tadeuszh
author_rank: Newbie
timestamp: April 23, 2024, 03:49:33 pm
content: Hi there,so I have a simple problem, I am trying to controll the LED with a button. I want it to flash when the button is set, and darken when it's on reset. I've used the TogglePin function, and it doesn't work. It changes the LED state and leaves it as it is. I've tried removing the else statement cauze I thought it might be enough for one if to be written - but when i did, it crashes. I mean it works but once it lights up, the communication between button and LED breaks and clicking the button doesn't change the LED's state. I have to mention that it is supposed to be controlled by ISR. Any advices what do I do?void ToggleDiode(){if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_5) == GPIO_PIN_RESET){HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_7);}else{HAL_GPIO_TogglePin(GPIOA,GPIO_PIN_7);}}void handleButtonInterrupt(void){ToggleDiode();}

author: xvr
author_rank: Frequent Contributor
timestamp: April 23, 2024, 05:04:44 pm
content: > I want it to flash when the button is setSo you need some activity (LED flashing) while button is pressed, i.e. not change they state. So you can't do it EXCLUSIVELY in button press interrupt.You need something ongoing, that will be executed in cycles. Do you use FreeRTOS? If yes you can create Task to flashing LED.

author: CountChocula
author_rank: Unknown
timestamp: April 23, 2024, 05:08:00 pm
content: Assuming that I understand your port correctly, the problem is that you're just calling ToggleDiode() once when the a change in the button pin's status causes an interrupt. ToggleDiode() runs just once and then just flips the status of PA7, regardless of what PA5 reads at that point in time. If you want the LED to flash, you don't even need to use interrupts; you could just have something like this (written from memory, so may need some tweaking to actually make it work):Code:#define BUTTON_PIN_PORT GPIOA#define BUTTON_PIN GPIO_PIN_0#define LED_PIN_PORT GPIOC#define LED_PIN GPIO_PIN_13#define FLASH_INTERVAL 500void ToggleDiode() {static uint32_t last_time = 0;if (HAL_GPIO_ReadPin(BUTTON_PIN_PORT, BUTTON_PIN) == GPIO_PIN_SET) {// Turn off the LED if the button is not pressed (assumes that the button pin is set to input with a pull-up resistor)HAL_GPIO_WritePin(LED_PIN_PORT, LED_PIN, GPIO_PIN_RESET);} else {// Determine whether it's time to flip the bitif (HAL_GetTick() - last_time > FLASH_INTERVAL) {HAL_GPIO_TogglePin(LED_PIN_PORT, LED_PIN);last_time = HAL_GetTick();}}}int main() {HAL_Init();SystemClock_Config();while (1) {ToggleDiode();// Do other thingsHAL_Delay(1);}}This will work without blocking the rest of your program.HTH,—CC
Options for SoC with on-board antenna and external antenna - Page 1
Forum section: electronics / general

author: ElectricBananaHand
author_rank: Newbie
timestamp: April 10, 2024, 09:25:00 am
content: Hi!I am looking for a SoC that both has an on-board antenna as well as an external one. I have found this product:https://www.espressif.com/sites/default/files/documentation/esp32-s2-wroom_esp32-s2-wroom-i_datasheet_en.pdfBut here it seems like the position of the resistor determines wether which one it will use.Here is also a link that uses a different model and here it says:"Note: You can’t use the two antennas at the same time, so you can only have one connection for the antenna."https://randomnerdtutorials.com/esp32-cam-connect-external-antenna/#:~:text=ARDUINO%20REVIEWS%20PROJECTS-,ESP32%2DCAM%20Connect%20External%20Antenna%20(Extend%20Wi%2DFi%20Coverage,servers%20and%20other%20connectivity%20problems.So my question is, has anybody come across a SoC that has the logic to decide wether to use the external antenna or on-board depending on the signal strength?Thank you!

author: hans
author_rank: Super Contributor
timestamp: April 10, 2024, 10:52:00 am
content: For those modules its more of a manufacturing decision to build a module with PCB or external antenna.Many cheap RF SoCs only have a single antenna port. If you want to select during "run-time", you could use a SPDT RF switch to switch between either ports. Analog Devices has plenty of such devices, among others vendors. Do select one that can support the maximum transmit power, as some parts are limited to only +10dBm or so. Oh and some parts have real PITA supply rails.. but there are also parts that can run of regular 1.8V or 3.3V suppliesIt does mean custom hardware so a custom board design though...

author: MarkT
author_rank: Frequent Contributor
timestamp: April 19, 2024, 07:49:56 pm
content: By resistor you mean the 0 ohm link? You'd need a PIN diode switch chip to take its place. To add that requires adhering to microstrip design principles as RF doesn't tolerate impedance mismatch, especially for TX as VSWR mismatch can damage the transmitter in some cases.
Issues with LwIP Multi-Interface Switching - Page 1
Forum section: electronics / general

author: tilblackout
author_rank: Contributor
timestamp: April 19, 2024, 08:45:02 am
content: Hello everyone, I am implementing a program with LwIP that supports multiple network interfaces, allowing internet access via both a 4G module and Ethernet. Switching between network interfaces is simply done by calling netif_set_down/up and netif_set_default.The 4G module is connected to the microcontroller via USB and supports RNDIS mode, which means the TCP protocol runs within the module, and the microcontroller can acquire an IP address via DHCP from the 4G module to access the internet.However, I've encountered a peculiar issue. When switching the network to the 4G module, I cannot access the internet. Here are a few things I've tried:1、Without using Ethernet, upon powering up, the device successfully accesses the internet through the 4G module. If I then turn off the 4G module's internet connection and turn it back on, the device can obtain an IP via DHCP but fails to access the internet again, with continuous ping failures. (This makes me suspect a problem with the USB driver reinitialization.)2、With Ethernet connected, after powering up and accessing the internet via the 4G module, I then turn off the 4G module. The device automatically switches to Ethernet (which works fine for internet access). Then, when I turn off Ethernet and switch back to the 4G module for internet access, the 4G connection surprisingly works. (This leads me to suspect an issue with the LwIP multi-interface switching logic.)This means that as long as the netif switches from Ethernet to the 4G module, internet access is possible, but restarting the 4G module alone does not allow internet access. This makes it difficult to determine whether the issue lies with the USB driver or the LwIP stack.Does anyone have any insights or suggestions? Thanks for your input!
Turnigy 4x6 charger c8051f310 firmware required - Page 1
Forum section: electronics / general

author: GeoSaffer
author_rank: Newbie
timestamp: April 18, 2024, 10:51:07 am
content: Good evening all.I have a Turnigy 4x6 charger and one of the MCU's are blown. I have ordered the new mcu parts, but I a stuck with the firmware. They seem to be locked, so it does not seem possible to read from the working one and write to the new part. is there any way to get around it ?Anyone know of alternative firmware for it that i could just use to flash all of them, if there is no read "hack" available ?
How Error Detection work in CAN protocol - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: March 27, 2024, 10:51:12 am
content: Hello everyone,I've been looking the CAN protocol specifications and I'm a bit confused about how error detection works in CAN.In my understanding In the CAN protocol, one node transmits a message and other connected nodes receive it, if receiver node detect error in message it send error frame to other nodes to notifying them about errorI'm wondering: does only the receiver node check for errors, or do both the sender and receiver nodes check for errors? I means does sender node also check error before to transmit message on the bus?I'd appreciate any clarifications on this topic. Thank you in advance for your help!

author: IDEngineer
author_rank: Super Contributor
timestamp: April 05, 2024, 12:43:42 pm
content: Since no one else has responded....Both ends monitor the network for any of several error types. Collisions cause backoff and retransmission. As for bit errors occurring during transmit, here is a page from a nice plain-language intro from Microchip:

author: John Coloccia
author_rank: Super Contributor
timestamp: April 15, 2024, 07:33:11 pm
content: The transmitter checks for errors as well because it's constantly monitoring the bus, just like everyone else. In CAN, you are always reading the bus.The error that the current transmitter can detect is "I meant to send bit X, and instead I read back bit Y". Everyone else on the bus can detect valid/invalid messages and generate error frames or acks. The transmitter has no reason to check for format errors, etc. It assumes that it's transmitting what it intends to transmit. It just checks that the intended bit made it to the bus OK.FWIW, in CAN, there is no real arbitration/retry, like you normally think of it. Everyone transmits when they feel like it. The message ID's are prioritized. If you start transmitting and read back a higher priority ID than what you're trying to send, you shut up and let the other guy finish. More precisely, lowest ID is highest priority message, 1's are recessive, 0 is active. To transmit a 1, you do nothing. To transmit a 0, you drive the lines.So as you're transmitting the message ID, if you ever try and transmit a 1, but read back a 0, someone else is higher priority and you should shut up and read the rest of the message (i.e. you did nothing to transmit 1, and someone else did something to transmit 0).
STM32H7 mbed timeout Stop, Pause, Maskout what is best options? - Page 1
Forum section: electronics / general

author: DaveBy2
author_rank: Newbie
timestamp: April 16, 2024, 05:13:05 am
content: Hi AllI am having trouble using Timeout. From my main loop if i write to my LCD i want to set a timer for 10sec for the backlight. Then turn off backlight after the 10sec. I can get this and the callback routine routine to work quite simply. But i think there is exception if the timout interupt is called when the LCD is in the middle of doing something. This is my code.Code:using namespace std::chrono;Timeout toutTest;Timer timerTest;volatile bool lcdTimmerFlag =0 ;// Print to LCD/*!@param Message  String or character for LCD to Print@param clearLcdFirst  Clear screen first, Yes No@param Pos  Position of cursor, Default = 0@param Line  Line number, 0 = ist line, 1 = 2nd Line, Default = 0*/void lcdPrint (const char* Message, bool clearLcdFirst = true,int Pos =0,int Line =0){microseconds toutRemain = toutTest.remaining_time();timerTest.stop();if (clearLcdFirst == true) {lcd.clear();}lcd.setCursor(Pos,Line);lcd.print(Message);if (lcdTimmerFlag == FALSE){lcdBackLight(ON);timerTest.start();toutTest.attach(&lcdBackLightOff, 10s);lcdTimmerFlag = TRUE;} else {timerTest.start();toutTest.attach(&lcdBackLightOff, toutRemain);}}//void lcdBackLightOff() {timerTest.stop();toutTest.detach();lcdBackLight(OFF);lcdTimmerFlag = FALSE;}I belive i cant disable the interupt so i have attempted to: 1, stop the timer, 2, read the 'timeout.remaining_time()' 3, DO LCD instructions 4, reattached timeout with remainder.Am i completly barking up the wrong tree here?a few other problems i am having is the following line in PIO is always <opimised out> . So it cant be used.Code:microseconds toutRemain = toutTest.remaining_time();if i volitile it ieCode:volatile microseconds toutRemain = toutTest.remaining_time();then the lineCode:toutTest.attach(&lcdBackLightOff, toutRemain);brings up a TYPE error.Any experience or examples would be greatly appreciated. Cheers
Arduino MD-Parola capabilities - Page 1
Forum section: electronics / general

author: kuzm1nsk1
author_rank: Contributor
timestamp: April 07, 2024, 09:55:40 pm
content: Hi, is it possible to make only one digit scroll or use some animation with MD-Parola library for Arduino? For example if you want to display the clock 12:34:56, when 56 changes to 57, you want to use scrolling animation just for digit 6, in other words, only changing digits would use animation and the rest of the clock/text would be stationary.
CH32V003 warning - Don't leave SWIO/PD1 floating! - Page 1
Forum section: electronics / general

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 05, 2024, 05:12:37 pm
content: Just did a small production batch (300) and had about 5 units randomly resetting after a few secs to a few mins.Turns out the cause was leaving SWDIO/PD1 floating.Fix is to either add a pullup/pulldown R, or set bit 26 of AFIO->PCFR1 to make the pin I/O, and enable pullup/pulldown I/O mode on PD1.Latter may disable debug functionality but it seems to still allow reprogramming without access to the reset pin.

author: rhodges
author_rank: Frequent Contributor
timestamp: April 05, 2024, 05:47:09 pm
content: It sounds like a temporary workaround would be a jumper on the 3-pin programming header.

author: HwAoRrDk
author_rank: Super Contributor
timestamp: April 05, 2024, 08:33:48 pm
content: That's weird. I haven't encountered such a problem myself. Not even with devices running continuously for many hours on end. I've never put any external pull-up/down on the SWDIO, and in my code although I am always configuring that pin explicitly as an input, it is without internal pull-up/down.Maybe configuring PD1 as input is all that is necessary, regardless of internal pull-up/down setting. The datasheet is ambiguous as to whether SWDIO is active or not by default on that pin at reset. In section 1.4.16 it says: "The default debug interface pin function is turned on after system power on or reset", but then the pin-out table states that "Main function (after reset)" for PD1 is "PD1" (i.e. GPIO). I suspect it's the former.Are you absolutely sure it wasn't a problem with NRST/PD7? I have had problems with the reset pin being overly sensitive and causing random resets, fixed by adding a 100nF capacitor there.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: April 05, 2024, 09:42:59 pm
content: Yes, certain - PD7 has an internal pullup, but PD1 floats, which is never a good thing, even on pins that aren't connected to debug circuitry.Had 3 units that reliably would reset after 10-20 seconds running. Grounding PD1 fixed them reliably.Enabling pullup/down didn't actually enable pullup/down until I set bit 26 of the AFIO->PCFR1 register.The SPI port was routed to a header alongside PD1, and it always reset at some random time within a SPI access, so I suspect it was noise coupling.

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 05, 2024, 11:58:09 pm
content: Ubused pins should he configured as analog to turn all its circuitry off.
Does anyone have a date code lookup for Hitachi CPUs e.g. H8/300 HD6473238F10 ? - Page 1
Forum section: electronics / general

author: peter-h
author_rank: Super Contributor
timestamp: April 04, 2024, 02:22:36 pm
content: These are OL1, OM1 etc.After about 1995 they started labelling the sealed packages with actual dates, but never the chips themselves.
RED PITAYA BOM - Page 1
Forum section: electronics / general

author: acontu34
author_rank: Newbie
timestamp: April 03, 2024, 09:26:28 am
content: Did you know where can I find the bill of material about RED PITAYA STEMlab 125-14 v1.0?I need it to perform a reliability analysis for research scope.

author: Halcyon
author_rank: Unknown
timestamp: April 03, 2024, 09:38:04 am
content: Duplicate thread of:https://www.eevblog.com/forum/projects/red-pitaya-bom/Please stop starting identical posts in different parts of the forum.
how to retrieve firmware from stm32f2xx series - Page 1
Forum section: electronics / general

author: balu.2019@gmail.com
author_rank: Newbie
timestamp: March 23, 2024, 12:16:56 pm
content: Hi Team,Could you please let me know if there is any process to apply voltage glitch and get the firmware from stm32f2xx series.FYI, we have followed below link for stm32f1xx series and able to successfully retrieved the firmare.https://www.eevblog.com/forum/reviews/jabe-ud-1200-vs-jabe-ud-1200-pro-vs-jbc-cd-2sqe-need-firmware-for-ud-1200/25/Please let me know if there is any similar process for stm32f2xx.Much appreciate your help.Thanks,Balu.

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 23, 2024, 05:32:49 pm
content: Try:https://github.com/CTXz/stm32f1-picopwner/

author: balu.2019@gmail.com
author_rank: Newbie
timestamp: April 02, 2024, 06:56:40 am
content: Hi David,We have already tried and its working for F103 series, trying for F2xxx series.any other process to apply glitch for F2xxx series, please helpRegards

author: darkspr1te
author_rank: Frequent Contributor
timestamp: April 02, 2024, 07:17:10 am
content: There are two other attacks for stm i know offDFU attack where you read back using DFU commands and a USB overflow, works with hardware DFU or software DFU based off STM implementation.Vector table attack where you read flash then reset to a vector and read that byte.there is a third attack but I dont think it works on the F2 series and thats the boot from ram attack.darkspr1te

author: balu.2019@gmail.com
author_rank: Newbie
timestamp: April 02, 2024, 07:45:37 am
content: Hi darkspr1te,Could you please share some details of the below attacks (DFU and vector table) for STM32F2xx series.Thanks & Regards

author: darkspr1te
author_rank: Frequent Contributor
timestamp: April 02, 2024, 07:54:18 am
content: I did a sort of write up on both here ,https://www.eevblog.com/forum/microcontrollers/dumping-stm32-protected-firmware/darkspr1te
JLink script for bcm2837 - Page 1
Forum section: electronics / general

author: dobsonr741
author_rank: Frequent Contributor
timestamp: March 29, 2024, 03:16:39 pm
content: I wonder if anyone mastered connecting to bcm2837 with JLink and the Segger provided tools? OpenOCD can and does connecting fine using Link hardware. However, I want to use RTT, and that needs the native Sagger tooling. So I tried a few variations of jscript, attempting to configure CTI and debug base with no success.Code:JLINK_CORESIGHT_CoreBaseAddr = 0x80000000;JLINK_ExecCommand("CORESIGHT_SetCSCTICoreBaseAddr=0x80018000");It all ends up in:Code:No AP map specified by user. Setting auto-detected AP map.DebugRegs + CTI manually specified. ROM table scan skipped.Failed to identify core.****** Error: Debug registers of core not found. Debugging not possibleCould not determine core debug registers + core CTI. Debugging not possibleThe addresses are well know by OpenOCD, what is a working translation of them into Segger dialect?Code:set _DBGBASE {0x80010000 0x80012000 0x80014000 0x80016000}set _CTIBASE {0x80018000 0x80019000 0x8001a000 0x8001b000}

author: GromBeestje
author_rank: Frequent Contributor
timestamp: March 31, 2024, 03:55:51 pm
content: I don't know how to make it work with Segger's software, if it is RTT you are after, it is supported by recent versions of OpenOCD.

author: __george__
author_rank: Contributor
timestamp: April 01, 2024, 09:09:36 pm
content: It's a long time since I wrote a JLink script but I do remember that I had to oveload an initialization function for it to work. Searching a bit on github seems to confirm what I remember:https://github.com/kamejoko80/my_osek/blob/6dcf8a748e1d3b9b43ddcc94c077d3cd970b0d7e/NEO_M4_OSEK/tool/IMX6SX_WITH_JLINK_V1.0/IMX6SX_HOW_TO_DEBUG_CORE_M4.txt#L71But from your error message it seems that if you manually add the API as the github code shows you should go at least one step further.
MATLAB and C Language in Automotive Software Development - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: April 01, 2024, 06:35:25 pm
content: I'm looking clarity on how MATLAB and C language are integrated into automotive software development processes.Consider a basic task like implementing a system to control headlights using a button. How do MATLAB and C interact in this scenario? Are we writing C code directly within MATLAB, or does MATLAB generate C code from models? Furthermore, how does the compiled C code integrate into the vehicle's hardware?I'm interested to understand the workflow and roles of MATLAB and C language in automotive engineering.Any guidance on this process would be greatly appreciated. Thank you!
An old 40-pin PIC dev board - Page 1
Forum section: electronics / general

author: ledtester
author_rank: Super Contributor
timestamp: March 30, 2024, 09:04:27 pm
content: I picked this up at my local surplus store and was wondering if anyone recognized it or perhaps has used it once upon a time...It has a LM34 (TMP1) and a MAX522 DAC on board.

author: Gyro
author_rank: Super Contributor
timestamp: March 30, 2024, 09:20:06 pm
content: It's from Microdesigns Inc...http://www.microdesignsinc.com/qwikflash/index.htm#QwikFlash_Development_Kit_No._1P.S. If you follow the picbook.com link to Dr. Peatman's web site at the bottom of the page, you can download the schematic and other chapters as PDFs for free (not the whole book).

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 30, 2024, 09:26:32 pm
content: And the book for it. I refuse to accept 2003 was 21 years ago!http://www.microdesignsinc.com/picbook/book_info.html
Decoupling a PIC with one VDD and two VSS pins - Page 1
Forum section: electronics / general

author: jpanhalt
author_rank: Super Contributor
timestamp: March 30, 2024, 04:27:23 pm
content: This is a situation I have not faced before. PIC=16F1783 (28 pin DIP). It has one VDD and and two VSS pins on opposite sides. Construction is on a "typical" solderable breadboard with the same layout as most non-solderable ones have (i.e., SparkFun boards). I will be decoupling the paired VDD and VSS pins close to the PIC as usual plus a larger capacitor (say 4.7 uF tantalum) further away. The two VSS pins will be connected to each other with short wires.Should I run power near the second VSS and decouple there or just rely on the decoupling used between the VSS and VDD on the other side? Decoupling wll be 0.1 and 0.01 uF in parallel as recommended in the DS. ( I typically add a few uF (4.7 to 10 uF) capacitance at each pair of rails top and bottom.)

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 30, 2024, 04:58:44 pm
content: That pic consumes very little power and power decoupling doesn't require anything fancy.I'd use a bottom ground plane for strong ground, then put the decoupling caps near VDD pin and connect it to the bottom plane with some vias.But joining the gnd pins with a decent ground will also work fine, the important thing here is to keep the path close.

author: jpanhalt
author_rank: Super Contributor
timestamp: March 30, 2024, 05:38:14 pm
content: I can't use a ground plane as with a typical PCB as top and bottom are identical (attached).That was basically my plan. There will be a short and robust connection (24 AWG), not just a 24 mil PCB trace, between the two VSS pins. Decoupling on the side with paired VDD and VSS will be about as short to the unpaired VSS as I could do by bring a second VDD.I picked that chip as it was the narrowest DIP, 8-bit PIC with enough pins, all of which have IOC, I could find.John
Overclocking the RPi Pico - Page 1
Forum section: electronics / general

author: profdc9
author_rank: Frequent Contributor
timestamp: March 30, 2024, 04:19:00 pm
content: While RPi Pico is specified for a clock speed of 120 MHz, many have used it at much higher speeds.Are there any reports of long-term damage or stability issues of overclocking the RPi Pico, say at, double its nominal speed at 240 MHz? Or perhaps up to 270 MHz?Being able to squeeze a few more cycles out of a Cortex M0+ would help since it requires more instructions to do many operations than a more advanced core.
Getting Started with CycloneTCP - Page 1
Forum section: electronics / general

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: November 23, 2023, 09:35:20 pm
content: Hi,This opensource CycloneTCP from Oryx-Embedded seems to have it all the needed protocolshttps://www.oryx-embedded.com/and the github repohttps://github.com/Oryx-Embedded/CycloneTCPBut I can not find any tutorial or getting started documentation on them, Maybe I'm missing something, has anyone done project using it, can you guide me in some basic examples or how to use it for example on stm32?

author: ali_asadzadeh
author_rank: Super Contributor
timestamp: November 24, 2023, 11:18:24 am
content: really no one used it in here?

author: georgd
author_rank: Regular Contributor
timestamp: March 30, 2024, 05:16:11 am
content: Have you found tutorials in meantime?There are only few demo application for CycloneTCP:https://gricad-gitlab.univ-grenoble-alpes.fr/Projets-INFO4/20-21/05/STM32F7_CycloneServer/-/tree/masterhttps://github.com/steffanw/CycloneTCPGeorg
Multiple VL53L0X sensors - Page 1
Forum section: electronics / general

author: Tadeuszh
author_rank: Newbie
timestamp: March 11, 2024, 11:24:52 pm
content: Hi there,So I'm new to the whole microcontrollers world and I have an issue going on. To the point, I need a microcontroller (STM32) to be handling multiple VL53L0X sensors and my question is: is this possible to one microcontroller to run 7 of them?I am a part of a project on University where a you can say autonomic car, would detect objects using the sensors and connect with user, giving me the distance between them.Can someone tell me more about it?

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 12, 2024, 12:02:08 am
content: Yes you can. I recommend reading this app note, which deals with exactly that:https://www.st.com/resource/en/application_note/an4846-using-multiple-vl53l0x-in-a-single-design-stmicroelectronics.pdf

author: Tadeuszh
author_rank: Newbie
timestamp: March 12, 2024, 08:21:24 am
content: So if i need 7 of them, how many expander outputs do I use? (PCF8574N)I'm so sorry but I'm just starting my jurney and it's tough for me to understand the stuff that I'm reading about..

author: mikerj
author_rank: Super Contributor
timestamp: March 18, 2024, 01:40:46 pm
content: Depends on how many spare I/O pins you have on your micro. You need one output pin for each VL53L0X to hold them in shutdown whilst programming the I2C addresses, and optionally if you want to use the interrupt output from these devices you need one input pin for each VL53L0X with the input pins being capable of triggering an interrupt if required (you could poll them instead). For seven VL53L0X that's 14 pins, which should be easily possible on larger STM32 parts so no bus expander needed.If you want to use PCF8574N bus expanders (to save pins on the micro) then you'd need one for the shutdown pins and optionally one for the interrupt pins and then you'd have one unused I/O on each bus expander.

author: kevin.gibbs
author_rank: Regular Contributor
timestamp: March 26, 2024, 03:42:02 pm
content: Quote from: Tadeuszh on March 12, 2024, 08:21:24 amYou need to address the required sensor on pins A0-A2. If there are only seven sensors, you simply do not use one of the pins, P0-P7.
Where do microcontroller designers get peripheral designs from? - Page 1
Forum section: electronics / general

author: e100
author_rank: Frequent Contributor
timestamp: March 24, 2024, 05:20:06 am
content: For example the ESP32 has an onboard CAN controller which is similar in functionality to the NXP SJ1000 CAN controller, but isn't described in the documentation as being a replica of the SJ1000.Do chip manufacturers such as NXP license their module designs to other chip designers, or are there specialist design companies that do nothing but design peripheral modules that are licensed to chip manufacturers for use in their own products? I suppose it would be like the ARM model of development, except for peripherals instead of cores.

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 24, 2024, 05:31:48 am
content: Both, but your second option is by far the most common, except for very niche/custom peripherals that are designed in-house.One leader (similar to ARM as you said) of such IPs is Synopsys. There are many others out there though.

author: hans
author_rank: Super Contributor
timestamp: March 24, 2024, 09:18:34 am
content: Synopsys is indeed a pretty large supplier.Many USB HS peripheral designs are the same dwc IP design. There are some incremental versions out there, but many communities deliver the same driver stack. You can sometimes take a quick glance at the RTL to see if that matches up.I think other common peripherals for this treatment is CAN or Ethernet. All those protocols need to comply to standards.Maybe 16550 UART for some MCUs, but since UART also has taken many forms (SPI as secondary function, for example), I don't think its that common anymore.On the other hand, things like timers, ADCs, SPIs etc. are much more integral to a clever MCU architecture. If you look at Atmel, Nordic, TI or SiLabs, they have gone to great efforts to support some kind of event system, clock demands, bus designs to support async clocks or power/clock gated etc.

author: brucehoult
author_rank: Super Contributor
timestamp: March 24, 2024, 12:44:26 pm
content: Quote from: SiliconWizard on March 24, 2024, 05:31:48 amI was going to say "EDA tool suppliers such as Cadence and Synopsys also offer standard IP modules for most common peripherals, DRAM etc"I don't know which of the two has the larger selection. As I recall, SiFive worked with and offered their customers IP from both of them.

author: ataradov
author_rank: Super Contributor
timestamp: March 24, 2024, 03:40:03 pm
content: For CAN specifically, a lot of MCUs use M_CAN IP by Bosch.And in the RP2040 you can see the name of IPs and their source right in the datasheet.