hybridfree/eevblog-posts huggingface dataset:
How to use  (TempTale Ultra Temp data logger = STM32L152RCT6) as DEV BOARD  - Page 1
Forum section: electronics / general

author: vortex
author_rank: Contributor
timestamp: March 01, 2025, 11:26:06 pm
content: hi friends, i want to talk about the one time use temperature data logger and how to use them as dev board , theys come with different hardware capability some of them have great spec, Unfortunately, they becom electronic waste , the one i have today is TempTale Ultra Temp data logger come with:STM32L152RCT6 Ultra-low-power Arm Cortex-M3 MCU with 256 Kbytes of Flash memory, and 32 Kbytes of RAM up to 32 MHz256 Kbytes of Flash memory with ECC32 Kbytes of RAM8 Kbytes of true EEPROM with ECC128-byte backup registerTMP112AIDRLR I2C digital temperature sensorSPI flash 25WD40CTIG with 4MBCustom 7segment glass lcdTwo crystal 8mhz and 32khz used for real time clock**************TempTale Ultra Pinout*********GPIOC Pin0 LED GREENGPIOB Pin8 LED REDGPIOA Pin0 BUTTONGPIOA Pin1 BUTTONsmd code = OBS = TMP112AIDRLR digital temperature sensorGPIOB Pb6 SCL to Pin1 TMP112AIDRLRGPIOB Pb7 SDA to Pin6 TMP112AIDRLRspi flash 25WD40CTIGGPIOA Pa4 CS 1GPIOA Pa5 CLK 6GPIOA Pa6 SO 2GPIOA Pa7 SI 5custom glass lcd1 to GPIOC Pin9 | 2 to GPIOC Pin8 | 3 to GPIOC Pin7 | 4 to GPIOC Pin6 | 5 to GPIOB Pin156 to GPIOB Pin14 | 7 to GPIOB Pin13 | 8 to GPIOB Pin12 | 9 to GPIOB Pin1 | 10 to GPIOB Pin011 to GPIOC Pin5 | 12 to GPIOC Pin4 | 13 to GPIOA Pin3 | 14 to GPIOA Pin2 | 15 to GPIOA Pin816 to GPIOA Pin9 | 17 to GPIOA Pin10 | 18 to GPIOB Pin9pa8 RAM com 0pa9 RAM com 1pa10 RAM com 2pb9 RAM com 3pa2 BIT1 +COM0 = %pa2 BIT1 +COM1 = RHpa2 BIT1 +COM2 = HR(S)pa2 BIT1 +COM3 = MIN(S)pa3 BIT2 +COM0 = degreespa3 BIT2 +COM1 = degreesFpa3 BIT2 +COM2 = degreesCpa3 BIT2 +COM3 =pc4 BIT5 +COM0 = 1Apc4 BIT5 +COM1 = 1Bpc4 BIT5 +COM2 = 1Cpc4 BIT5 +COM3 = 1Dpc5 BIT6 +COM0 = 10Epc5 BIT6 +COM1 = 10Fpc5 BIT6 +COM2 = 10Gpc5 BIT6 +COM3 = rightdotpb0 BIT12 +COM0 = 10Apb0 BIT12 +COM1 = 10Bpb0 BIT12 +COM2 = 10Cpb0 BIT12 +COM3 = 10Dpb1 BIT13 +COM0 = CheckMarkpb1 BIT13 +COM1 = \pb1 BIT13 +COM2 = /pb1 BIT13 +COM3 = AVGpb12 BIT14 +COM0 = bigarrowpb12 BIT14 +COM1 = TEMPpb12 BIT14 +COM2 = :pb12 BIT14 +COM3 =pb13 BIT15 +COM0 = 100Epb13 BIT15 +COM1 = 100Fpb13 BIT15 +COM2 = 100Gpb13 BIT15 +COM3 = middotpb14 BIT22 +COM0 = uparrowpb14 BIT22 +COM1 = downarrowpb14 BIT22 +COM2 = StopSignpb14 BIT22 +COM3 = MAXpb15 BIT23 +COM0 = 1Epb15 BIT23 +COM1 = 1Fpb15 BIT23 +COM2 = 1Gpb15 BIT23 +COM3 = MINpc6 BIT24 +COM0 = 100Apc6 BIT24 +COM1 = 100Bpc6 BIT24 +COM2 = 100Cpc6 BIT24 +COM3 = 100Dpc7 BIT25 +COM0 = 1000BCpc7 BIT25 +COM1 = leftdotpc7 BIT25 +COM2 = DAY(S)pc7 BIT25 +COM3 =pc8 BIT26 +COM0 = heartpc8 BIT26 +COM1 = negativepc8 BIT26 +COM2 = Batterypc8 BIT26 +COM3 = TIMEpc9 BIT27 +COM0 = sunpc9 BIT27 +COM1 = Probepc9 BIT27 +COM2 = hourglaspc9 BIT27 +COM3 =in the attachments lib and example using cmsis with platformio
MRAM reliability test data - Page 1
Forum section: electronics / general

author: Smile2016
author_rank: Regular Contributor
timestamp: February 28, 2025, 03:27:20 am
content: Does anyone have more experience with MRAM magnetic field immunity testing? How resistant are these devices to external magnetic fields, particularly from strong magnets in close proximity? Any guidance on data retention test scenarios and qualification processes would be helpful, such as endurance for read/write cycles, data retention under no-power conditions , stress in extreme conditions (high/low temperatures, voltage spikes, etc.). I'm particularly looking for reference results and descriptions of test processes. this particular memory is part of a chipset where reliable data storage in industrial control systems where unexpected power interruptions can occur..

author: voltsandjolts
author_rank: Unknown
timestamp: February 28, 2025, 10:36:51 am
content: Probably questions for the manufacturer of the specific device. Check all available documentation first.There are also generic documents available by a web search, e.g.https://www.nxp.com/docs/en/application-note/AN3525.pdf

author: Smile2016
author_rank: Regular Contributor
timestamp: February 28, 2025, 04:17:20 pm
content: Quote from: voltsandjolts on February 28, 2025, 10:36:51 amIndeed, the manufacturer conducted some tests, but they weren't extensive. I'll need to repeat some of those tests using tinned steel sheet shield 0.1mm (looks effective ) around the device. I'm now creating my own test plan, knowing that my device is susceptible to magnetic fields.

author: voltsandjolts
author_rank: Unknown
timestamp: February 28, 2025, 05:30:09 pm
content: mu-metal, with it's high permeability, is generally preferred for magnetic shielding, but tin could be adequate for your requirements.Edit: You might also consider nvsram, to avoid any magnetic field issues.
ESP32 24V GPIO circuits - Page 1
Forum section: electronics / general

author: TheIronToSolderThemAll
author_rank: Newbie
timestamp: February 28, 2025, 03:11:34 pm
content: Hello,I want to make some kind of digital measurement IO that works on 24V. What i need:• 24 inputs / outputs which i can set to HIGH by some kind of shift register or I2C expander ( pulldown resistors to keep it at GND)• All 24 inputs must constantly report their status to the ESP32. (LOW or HIGH).• Everything above 1V should be considered HIGH.Is there a common circuit or is this such a niche product that I have to develop it completely myself?I am aware that most GPIO expanders work with max 5V, which I could convert by a mosfet high side switch (which needs many parts for 24 i/o), but how do I then report back the status of the pin? Voltage divider is not a solution, because between 1V and 24V should be considered HIGH.

author: Lindley
author_rank: Regular Contributor
timestamp: February 28, 2025, 04:06:30 pm
content: To read a voltage you need to use the ADC pins of the ESP32. eg pot divide the 24v input 7.3 : 1 = 0 - 3.3v and use 0.137v as your trigger voltage.Even the large ESP32 Wroom module only as 16 ADC channels, so might be easiest to use two ESP32 to read all 24 channels.You would have to test it out on one channel to prove it works ok for your circuit as the ESPs ADC is not that accurate .Another method would be to use 3 octal ADC chips like the MCP3008 with the pot divider as above, the results can the be read in via the ESPs SPI channel.It would be wise to fit each input with some method of overvoltage protection.

author: woofy
author_rank: Frequent Contributor
timestamp: February 28, 2025, 04:17:19 pm
content: For the 24v inputs you can use a voltage divider.2 * 10k resistors in series from input to ground with a diode (1n4002) across the lower resistor, cathode to ground.Take the junction of the resistors to the ESP32 input.

author: kripton2035
author_rank: Super Contributor
timestamp: February 28, 2025, 04:44:18 pm
content: may be a 3v zener diode as a clamping diode could work ?

author: nctnico
author_rank: Super Contributor
timestamp: February 28, 2025, 05:09:03 pm
content: For these situations I use a cheap multi-channel ADC. That way I can read the exact level on a pin (for diagnostic purposes) and can translate to a logic level at will in software.
WEACT CH32V203C8T6 up and running on Arduino w/ WCH Board Manager + Question - Page 1
Forum section: electronics / general

author: rka
author_rank: Newbie
timestamp: July 11, 2024, 08:32:41 pm
content: Happy Thursday All!Since I dipped my toe into the CH32Vxxx wonderland I've progressed a good bit and wanted to ask a couple questions to the more knowledgeable folks here to keep from getting bogged down.I've progressed through the CH32V003/MounRiver Systems phase and when I discovered the WCH board manager for Arduino, I decided to see if that was clearer to me as a tool. I was able to program the EVT board to flash a LED which showed me that I'd accomplished *something*.Just for laughs, I tried programming the WEACT CH32V203C8T6 and after a little head scratching, I was able to flash it's LED too.Since I was on a roll, I decided I'd try to make my i2c 1602 LCD work with it and began figuring out how to use the LiquidCrystal_LCD libraries work. I naively believed that the WCH board manager had taken such things into consideration when the created their tool, but it was immediately clear that the only LiquidCrystal_i2c library there was the Arduino native one which is focused on the ATMEGA it says.I rolled up my sleeves and went to the Git instance for the WCH board manager and found some spurious i2c entries, but it looks like a work in progress.Does anyone know of libraries that are suited for the CH32V203 et.al. controllers out there under another heading? Using my pointy little head, I tried various searches but couldn't find anything that even was close. One fell using a different LCD display but that's about it.I'd appreciate any pointers or creative suggestions. My reasoning is that surely there is some person or group that would have solved this problem since the RISC-V family of devices seems to have made headway.By the way, Free "Pro tip" - I found that I needed to unlock the read/write function in the WEACT board using MounRiver 'config' function before I could do anything with it, on either MounRiver or Arduino. That would at least get you to flash a LEDrka

author: BlakeSeven
author_rank: Newbie
timestamp: February 18, 2025, 02:14:51 am
content: Hiya, check out CNLohr's ch32fun repo on github. It has an LCD example although I am struggling to get it to work. Did you find a solution?
Converting C30 to XC16 code.. - Page 1
Forum section: electronics / general

author: jcdammeyer
author_rank: Newbie
timestamp: February 14, 2025, 06:24:58 am
content: I've had to convert a program to compile with XC16. Up until now it was fine with the C30 compiler on a WIN-7 system but unfortunately the WIN-7 system crashed and the ICD-3 isn't supported on the WIN-10 system. And of course MPLAB-8 runs on WIN-10 but doesn't talk to the ICD-4.I've managed to link in the appropriate libraries etc so that with the C30 compiler (licensed and optimized) it now creates the program and the ICD-4 programs the PIC30F5011. MPLAB-X no longer throws a fit.However if I did want to update to the XC16 I can't find anything equivalent to this CAN library as documented in the C30 can.h include file.// Put module into Configuration mode using Microchip can.h parametersCAN1SetOperationModeNoWait(CAN_IDLE_STOP &CAN_MASTERCLOCK_1 &CAN_REQ_OPERMODE_CONFIG &CAN_CAPTURE_DIS_NO_WAIT);Not only that, under C30 to set the configuration bits a series of macros like:_FOSC(XT_PLL8 & PRI & CSW_FSCM_ON);set the configuration bits but that means also adding:#include "p30F5011.h"The XC16 compiler uses defines.#pragma config FPR = XT_PLL8 // Primary Oscillator Mode (XT w/PLL 8x)#pragma config FOS = PRI // Oscillator Source (Primary Oscillator)#pragma config FCKSMEN = CSW_ON_FSCM_OFF// Clock Switching and Monitor (Sw Enabled, Mon Disabled)So the question is if I want to use XC16 is there an equivalent library for CAN bus?

author: JPortici
author_rank: Super Contributor
timestamp: February 14, 2025, 08:26:11 am
content: Quote from: jcdammeyer on February 14, 2025, 06:24:58 amICD3 works fine under windows 10, and always had, at least under MPLABX. Not sure about MPLAB 8 as i haven't used it in ages.other points:- never include the device file, but only include <xc.h>- put configuration pragmas in a c file, before any include- be wary of any declaration that doesn't use fixed width types (those in sdtint.h), for example using char for uint8_t could be bringing you pain as the signedness of char is implementation defined- older versions of XC16 (pre 1.35 IIRC) had the PLIB installed alongside them, slightly newer (pre 2.00) didn't but were compatible with. I think the PLIB from C30 and XC16 were compatible/the same, you might be missing those? (should be available in the XC16 downloads page, or in the MPLAB Ecosystem Archives) - Though it was never a problem for me as i learned early on how better it was to write my own libraries- Older compiler was C90 + extensions, XC16 >= 2.00 is C99 with all the differences it brings

author: jaka
author_rank: Contributor
timestamp: February 14, 2025, 10:39:13 pm
content: Quote from: JPortici on February 14, 2025, 08:26:11 amICD3 works fine with MPLAB 8 too, on windows 10. And on windows 11.Changing between MPLAB 8 and MPLAB-X is little more complicated. There is the app to change between the two, but that has not worked for me. I have had to fix the paths on ICD3_switcher64.bat and then call it from command line, as administrator.
How to draw chart in VB.NET with transparent background? - Page 1
Forum section: electronics / general

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: February 13, 2025, 02:48:36 am
content: Hi group,Can anybody help me?I am trying to draw a chart with a transparent background in VB.NET.I have tried using:chart.backColor = color.Transparentchart.chartArea(0).backColor =color.TransparentAndchart.backColor = Color.FromAgrb(0,0,0,0)chart.chartArea(0).backColor = Color.FromAgrb(0,0,0,0)These don't work for me.The ultimate aim is to import an image from the clipboard and have the image as the background for the chart.Many thanks,Jay_Diddy_B

author: m k
author_rank: Super Contributor
timestamp: February 13, 2025, 06:48:06 am
content: Picture1.BackColor = Color.TransparentPicture2.Parent = Picture1Picture3.Parent = Picture2One of those four zeros is an alpha channel.It defines how much transparency that color includes.So pure alpha channel is totally transparent, but other colors can also have similar effects.If your stuff is part of a form that form has a solid base.So you must stack stuff on something that can accept transparency.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: February 14, 2025, 04:34:53 pm
content: m k,Thank you for your reply. The input has got me going in the right direction. I will reply again when I have finished.Regards,Jay_Diddy_B

author: m k
author_rank: Super Contributor
timestamp: February 14, 2025, 07:04:13 pm
content: It's oil painting, bottom first.When picture is drawn all pixel positions must quite obviously be serviced.What is the value of transparent, there is no such value as nothing.So underneath must be known and that underneath color is copied to the position of transparent pixel.If pixel is partially transparent then two colors are summed somehow.Windows desktop has partially transparent dragged icons.Icons play ball but it's desktop that is doing the trick.
T48 programmer can't select ICSP port ?? - Page 1
Forum section: electronics / general

author: MathWizard
author_rank: Super Contributor
timestamp: December 16, 2024, 01:08:01 pm
content: I'm trying to program an ATtiny44A 14-pin SOIC, on a PCB with pin headers, so I hooked up my new T48 to program it over 4-wire SPI, using the ICSP header, so far it worked great for an Attiny13A and ATmega169PA.But in the windows program Xgpro v12.67, when I select the ATtiny44A, in either SOIC or DIP, the option to program over the ICSP header on the T48, is greyed out. I can only choose the ZIF socket.Now I could plug into that, but why can't I use the ICSP header for 4-wire SPI, just like the other chips ? I looked it up just get the same things over and over.Also I can hear something rattling around inside it, like a solderball or PCB debris, since it fell on the carpet a few days ago, but the self-check passes. Still, I better open it and have a look.

author: coromonadalix
author_rank: Super Contributor
timestamp: December 16, 2024, 03:14:09 pm
content: normally on chip selection you have icsp selection ? unless their sw is borked, can you find older versions ?

author: MathWizard
author_rank: Super Contributor
timestamp: December 16, 2024, 03:33:36 pm
content: When I select ATmega169PA, the ZIF and ICSP port options are available, but not for the ATtiny chips I tried (maybe I never used on the ATtiny13A yet).And when using the ZIF socket, it wants to detect ALL PINS, so you can't just plug in the SPI pins. IDK, maybe they never wrote the program to use that port, for these chip's. The 169PA has 64pins, and the max socket size I got with this kit was maybe 48 or 56pin, and the ZIF is only 40pin anyways.

author: rfdes
author_rank: Regular Contributor
timestamp: February 13, 2025, 07:30:15 pm
content: Curious if you found a solution to your problem. I, too, discovered that the ICSP port is greyed out when selecting one of the Attiny parts (Attiny45 in my case). You mentioned that the Attiny parts were ICSP compatible with some earlier version of the Xgpro software. I tried downloading a couple of earlier versions and didn't find one that would work.Also, Is there a 'version change' document outlining what features/bugs were addressed between versions?I couldn't find anything on their site.Thanks.Jim
Arduino IDE raising an error - Page 1
Forum section: electronics / general

author: mon2
author_rank: Frequent Contributor
timestamp: February 12, 2025, 09:03:07 pm
content: Hello. Would anyone have ideas on how to fix this fault?Sketch uses 59760 bytes (2%) of program storage space. Maximum is 2093056 bytes.Global variables use 9516 bytes (3%) of dynamic memory, leaving 252628 bytes for local variables. Maximum is 262144 bytes.Resetting COM27Converting to uf2, output size: 153088, start address: 0x2000Scanning for RP2040 devicesERROR:Description = Not foundGet-WmiObject : Invalid class "Win32_LogicalDisk"At line:1 char:1+ Get-WmiObject -class Win32_LogicalDisk | Format-Table -Property Devic ...+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : InvalidType: ([Get-WmiObject], ManagementException+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommandUnable to build drive listFailed uploading: uploading error: exit status 1

author: Dazed_N_Confused
author_rank: Contributor
timestamp: February 12, 2025, 09:07:31 pm
content: Quote from: mon2 on February 12, 2025, 09:03:07 pmIs the Pico in bootloader mode?

author: mon2
author_rank: Frequent Contributor
timestamp: February 13, 2025, 02:21:01 pm
content: Thanks for the reply. Yes, it is.From some internet searches, it is something to do with Windows shell / paths but unable to correct the fault. For now, I have switched to a different laptop as a work around.
Xgecu TL866iiplus- looking for a copy of the bootloader hex file. - Page 1
Forum section: electronics / general

author: Jack Plane
author_rank: Newbie
timestamp: February 08, 2025, 11:35:42 pm
content: I had a working version of the TL866ii+ and fell into the trap of updating the firmware. From there I managed to delete the bootloader because I did not research the problem properly. I don't think it is a genuine model. The microcontroller is a PIC24FJ256GB110 and I loaded a Mikroelectronics example hex bootloader which the laptop picks up as unknown device, this is because I cannot edit the PID and VID as I don't have MikroeC. I have tried Mplab X ide but it gets very complex with lots of errors. I think the original hex file is encrypted but I'm hoping some one might be able to help.

author: coromonadalix
author_rank: Super Contributor
timestamp: February 11, 2025, 05:18:47 pm
content: maybe some help therehttps://proghq.org/wiki/TL866_II_PLUS/Bootloaderhttps://github.com/radiomanV/TL866/issues/30http://www.diybcq.com/archiver/tid-144902.htmlon the old tl866 you could grab the update file, you had tools to rewrite the serial or change the model, but for the bootloader ?edit maybe there ?https://gitlab.com/DavidGriffith/minipro/-/issues/210http://forums.xgecu.com/viewthread.php?tid=318866 II schematichttps://elektrotanya.com/tl866ii_plus_eeprom_programmer_sch.zip/download.html#dl

author: Jack Plane
author_rank: Newbie
timestamp: February 11, 2025, 08:54:29 pm
content: I thought that I could just get a copy of the bootloader and then use the manufacturer's software to update the firmware. However there seems to be much more going on in the background of the 'simple' bootloader. Also there is the little problem of the serial number. I will look through the links you kindly included and see if I can glean more information and look if there is anything on the Internet. It's interesting stuff, I've learnt a bit and I'm not afraid to download files to a device that is already non functional but not broken.
Microcontroller JTAG question - Page 1
Forum section: electronics / general

author: Adam60
author_rank: Regular Contributor
timestamp: January 24, 2025, 05:07:22 pm
content: Good day. I have a Microcontroller out of an automotive ECU that I would like to extract raw data from and transfer it to a good board. Typically this would be done through JTAG connections on the board but the MCU had been removed and there was some damage done to quite a few pads on the it. The pads which are connected to JTAG are still intact. Would it be possible to connect directly to the MCU with a device and read or extract the information from the MCU itself?This is an SPC5674FMVY3 MCU. Any suggestions on what device would connect to it as well? I am fairly new at this part of electronics and have a basic understanding of MCU/JTAG/BDM etc.

author: ataradov
author_rank: Super Contributor
timestamp: January 24, 2025, 08:19:57 pm
content: You would need to power it, and it is a huge BGA device, so powering it would not be easy.And there is a good chance that the firmware is locked. I doubt serious vendor would forget that.

author: rounin
author_rank: Regular Contributor
timestamp: February 11, 2025, 05:39:44 am
content: Those automotive ECUs often use NEXUS trace to load and extract cal data, and emulate cal data. Can do things like overlay/ redirect certain memory regions using the nexus probe Probably locked down tho after its been released. If you have to ask the price, they probably won't sell it to you, and will be confused why you aren't an automotive oem. (I worked on a MPC5777M for a project, which is kinda in the same family as the MPC5674 (markedSPC5674 on the package) but never used the NEXUS probe).NXP does sell the jtag probe and has an IDE for the series... but it'll be locked.
CH32V003 Timer issue during Sleep - Page 1
Forum section: electronics / general

author: corgon
author_rank: Contributor
timestamp: May 02, 2024, 03:25:15 pm
content: Hi,I'm struggling with Tim2 not running during Sleep (WFI).If I have activated the sleep mode, TIM2 in interrupt mode does not run.Can you please take a look at what's wrong or what I've overlooked?I really appreciate your advice.Here is the complete compilable code:Code:#include "debug.h"//#define SYSCLK_FREQ_8MHz_HSI 8000000 //Internal clock 8MHz// Global Variablesu_int counter = 0;// GPIO Settingsvoid GPIO_INIT(void){GPIO_InitTypeDef GPIO_InitStructure = {0};RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD, ENABLE);GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;GPIO_InitStructure.GPIO_Speed = GPIO_Speed_2MHz;GPIO_Init(GPIOD, &GPIO_InitStructure);}// Timer TIM2 Setting and Interrupt setting *void TIM_INT_Init(u16 arr, u16 psc){TIM_TimeBaseInitTypeDef TIMBase_InitStruct;NVIC_InitTypeDef NVIC_InitStruct;RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);TIMBase_InitStruct.TIM_Period = arr;TIMBase_InitStruct.TIM_CounterMode = TIM_CounterMode_Up;TIMBase_InitStruct.TIM_Prescaler = psc;TIMBase_InitStruct.TIM_ClockDivision = TIM_CKD_DIV1;TIM_TimeBaseInit(TIM2, &TIMBase_InitStruct);TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);NVIC_InitStruct.NVIC_IRQChannel = TIM2_IRQn;NVIC_InitStruct.NVIC_IRQChannelPreemptionPriority = 5;NVIC_InitStruct.NVIC_IRQChannelSubPriority = 5;NVIC_InitStruct.NVIC_IRQChannelCmd = ENABLE;NVIC_Init(&NVIC_InitStruct);TIM_Cmd(TIM2, ENABLE);}// Mainint main(void){NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1);SystemCoreClockUpdate();GPIO_INIT();Delay_Init();TIM_INT_Init(1000,10000); //(period, prescaller)// Infinite loopwhile(1){Delay_Ms(10);PWR_EnterSTANDBYMode(PWR_STANDBYEntry_WFI); // Enter to Sleep Mode}}// Timer TIM2 Interrupt Handlervoid TIM2_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));void TIM2_IRQHandler(void){if (TIM_GetITStatus(TIM2, TIM_IT_Update) == SET){counter++;if (counter >=3) {GPIO_WriteBit(GPIOD, GPIO_Pin_5, 1);Delay_Ms(500);GPIO_WriteBit(GPIOD, GPIO_Pin_5, 0);counter =0;}}TIM_ClearITPendingBit(TIM2, TIM_IT_Update);}Thanks,Corgon

author: bikeNomad
author_rank: Contributor
timestamp: February 09, 2025, 07:24:36 pm
content: Have you tried not using the fast interrupt mode?

author: eTobey
author_rank: Super Contributor
timestamp: February 10, 2025, 07:48:35 am
content: Is the timer meant to be running in this sleepmode?
STM32H743IIT6 module - looking for  schematic and examples - Page 1
Forum section: electronics / general

author: up8051
author_rank: Frequent Contributor
timestamp: September 05, 2024, 09:40:06 am
content: I bought such a module on Aliexpress.https://www.aliexpress.com/item/1005007227916481.htmlThe seller was supposed to send a diagram and documentation, but after the purchase he stopped responding to messages.Maybe someone has at least a schematic of this module.BR JarekC

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 05, 2024, 09:59:51 am
content: Nice board. I have the Waveshare version of it including the schematics, but there will be differences.There is also theWeActStudioone, but that also differs.

author: up8051
author_rank: Frequent Contributor
timestamp: September 05, 2024, 11:26:04 am
content: I also have WeAct Studio boards but I needed the SDRAM version (WeAct don't offer).I chose a supplier who has 100% good reviews, in the comments there is information that he sent documentation but does not respond to my messages.As a last resort, I will recreate the diagram manually.

author: pcprogrammer
author_rank: Super Contributor
timestamp: September 05, 2024, 03:47:59 pm
content: Here is the one of the WaveShare board I have. Maybe it helps a bit.

author: coromonadalix
author_rank: Super Contributor
timestamp: September 05, 2024, 03:52:08 pm
content: or this ?https://www.mouser.ca/pdfDocs/Schematic_STM32H7_Trace_ReferenceBoard.pdf

author: marcopolo
author_rank: Regular Contributor
timestamp: September 05, 2024, 05:09:54 pm
content: Quote from: up8051 on September 05, 2024, 11:26:04 amYes 100% of reviews are positive but there are only 5 reviewsThe only solution: ask for a refund.

author: up8051
author_rank: Frequent Contributor
timestamp: September 05, 2024, 05:20:51 pm
content: For now, I have sent requests to share the scheme to other sellers on Aliexpress.Maybe someone will answer.

author: JojoS
author_rank: Contributor
timestamp: February 08, 2025, 03:40:34 pm
content: Have you been successful in getting documentation?I have similar boards from Fanke FK743M2 and FK743M5. They have schematics and a bsp with lots of sample code, in Chinese but Google helps translating.The only design quirk is the non standard RGB connector and touch I2C is not on hardware I2C pins.
MSPM0L1105 gpio interrupts - Page 1
Forum section: electronics / general

author: ooo
author_rank: Newbie
timestamp: February 06, 2025, 07:42:11 pm
content: HelloI am struggeling with writing interrupt service routine in CCS (code composer studio) for the MSPM0L1105. I wantto generate interrupt if a GPIO is toggled basically. I am pretty surehow it should be setup in the syscfg GUI.The problem is that I dontreally know the syntax of how you write the interrup service routinefunction (not "inside" the function but how it should be "formed").Happy for all answers// electronics guy

author: Phoenix
author_rank: Frequent Contributor
timestamp: February 08, 2025, 01:29:20 am
content: Is there an example project in the sdk for gpio interrupts?https://dev.ti.com/tirex/explore/node?node=A__AE4rG5bvDO.mJC0shMUzIg__MSPM0-SDK__a3PaaoK__LATEST

author: Buxtehude
author_rank: Newbie
timestamp: February 08, 2025, 10:17:03 am
content: In CCS 12.8.1, using ticlang compiler, in project folder I can find interrupt prototypes under Referenced Source / SysConfig / startup_mspm0l110x_ticlang.c.GPIO0/PORTA interrupt is in INT_GROUP1 for mspm0l1105 so you must use GROUP1_IRQHandler in your code.Additionally you must enable gpio interrupt in NVIC yourself:Code://- GPIOA:// + Standard Output: PA26 (LED)// + Standard Input with internal pull-up: PA16 (BUTTON)void GROUP1_IRQHandler(void){DL_GPIO_togglePins(GPIOA, OUTPUT_LED_PIN);}int main(void){SYSCFG_DL_init();NVIC_EnableIRQ(GPIOA_INT_IRQn);while (1){}}

author: ooo
author_rank: Newbie
timestamp: February 08, 2025, 02:04:40 pm
content: Yes I managed to fix it thank you
9S08 micro - is RSP then exit subroutine okay? - Page 1
Forum section: electronics / general

author: Circlotron
author_rank: Super Contributor
timestamp: February 02, 2025, 09:34:27 pm
content: I have a program where during a sub I check for a number of error conditions. If I find an error I want to exit the sub and JMP to an error handling routine instead of RTS and simply continuing on. Is RSP then JMP to whatever okay? The error handler would look after stuff I had set up manually, but besides the stack pointer being reset, are there other things I should be aware of? Written in assembly. I wouldn’t call myself a programmer.

author: Benta
author_rank: Super Contributor
timestamp: February 03, 2025, 08:40:15 pm
content: RSP is unsuitable for this, it's an initialization instruction, don't mess with the stack pointer unless other solution is impossible.I'd probably rather execute an SWI to land in the error correction routine and return with an RTI.But perhaps I'm misunderstanding your need.

author: grumpydoc
author_rank: Super Contributor
timestamp: February 05, 2025, 09:42:49 pm
content: Depends where you want to go after handling the error.RSP stuffs 0xFF in the low byte of the stack pointer, it doesn't do anything else like setting the interrupt mask, so if wiping out the call stack and (say) returning to the start of your main loop is what you want to do after dealing with the error then it might well be OK to issue an RSP.I think that's within the range of things which are plausible in the general case but as it's your code only you can say.
Help connecting SPI Flash memory to PSoC5 (hardware + firmware) - Page 1
Forum section: electronics / general

author: Alinik
author_rank: Contributor
timestamp: February 05, 2025, 10:33:59 am
content: Hello everyone,I'm working on a project using a PSoC5 (CY8C5888LTI-LP097) and I need to add an external SPI flash memory to store configuration data and logs. I don’t have much experience with external flash memories, so I’d appreciate advice on both hardware and firmware aspects.Memory SelectionWhich SPI flash memories (preferably Cypress or Infineon) are compatible with the PSoC5 and easy to integrate?I'm looking for a device with a capacity between 4 MB and 16 MB.Should I opt for a Quad-SPI flash or is a standard SPI flash sufficient for a beginner?I'm trying to balance performance with ease of integration.Hardware ConsiderationsInterfacing: How should I connect the SPI pins (SCK, MOSI, MISO, CS) of the PSoC5 to the flash memory? Do I need to use pull-up or pull-down resistors on these lines?Voltage Levels: The PSoC5 operates at 3.3V. If the flash memory also operates at 3.3V, do I need any level shifting?PCB Layout: Are there any schematic examples or best practices for PCB layout (trace length, decoupling strategies, etc.) that you would recommend for this interface?Firmware ConsiderationsSPI Master Configuration: How do I configure the SPI Master in PSoC Creator to communicate effectively with the flash memory?Libraries and Drivers: Are there any pre-existing Cypress libraries available for handling read/write operations with SPI flash memory?Common Pitfalls: What common errors should I avoid during initialization and operation?Extra QuestionsWould you recommend Cypress flash memories like the S25FL116K or any other model in the S25FL series?Are there any tutorials or reference designs specifically for interfacing a PSoC5 with SPI flash memory?Any advice, documentation, or reference designs would be greatly appreciated!Thank you in advance for your help.
Texas SE370C742A programming circuit. - Page 1
Forum section: electronics / general

author: djsb
author_rank: Super Contributor
timestamp: February 01, 2025, 10:13:16 am
content: A bit of MCU archaeology for you all. In a recent tidy up, I discovered a few old TMS370C742 relics from my student days. I think I still have one or 2 SE370C742A programmable windowed versions of the TMS370C742 microcontroller. I also still have a few floppy disks with some related software on them.I'm just wondering if there are any EEPROM programmers that will program the SE370C742A. Or are there any circuits I can try?Here is a method I've foundCode:The Family Data Manual describes programming in chapter 6.4:"The program EPROM modules used in the TMS370 family replace the 4k,8k-, 16k- or 32k-byte program ROM within the TMS370 families for systemprototypes or small production runs.These modules consist of an 8k byte array and a 16k byte array of EPROMat address locations 6000h through 7fffh and 4000h through 7fffh,respectively. [...]The programming control register for the program EPROM for the 8k and16k EPROMS is located at address 101Ch. [...] Write cycles to theprogram EPROM requires a special sequence of events. This sequence isdescribed in subsection 6.4.2An external voltage supply is needed at the MC pin to provide thenecessary Vpp for programming.6.4.2.1) supply the programming voltage to the MC pin2) Write to the EPCTL to set the VPPS bit to 13) Perform a normal memory write to the target EPROM location4) Write to the EPCTL to set the EXE bit to 1. Wait at least twomicrosecpmds after step 2.5) Wait for program time to elapse (1 millisecond)6) Write to the EPCTL to clear the EXE bit (leave VPPS set to 1)7) Read the byte being programmed; if correct data is not read, repeatsteps 4 through 6 X times up to a maximum of 258) Write to the EPCTL to set the EXE bit to 1 for final programming9) Wait for program time to elapse (3X milliseconds duration)10) Write to the EPCTL to clear the EXE and VPPS bitsBPPS is bit 6, EXE is bit 0 of the EPCTL register.Also I wonder if there is an archive of any of the assembler or c compiler tools out there.These MCU's appear to have been used in a few automotive applications in the past.I used them during the late 90's for my HND.Just curious if I can make use of them for any educational or practical use. Datasheet attached.
DC 24V Ringing Waveform due to external AC220V Cord plug (without load) - Page 1
Forum section: electronics / general

author: JinhoAhn
author_rank: Newbie
timestamp: January 26, 2025, 09:10:49 am
content: Hello.I'm now designing the I/O Control Board by using ESP32 MCU.24Vdc Relay will be used for Contact Output.During Turning ON the relay for the AC 220V load by using 24V relay, 5V, 3.3V, 24V DC Power is ringing fastly (tens of nano seconds).There's a freewheeling diode for coil. so, it's not a switching noise.So, I thought it's due to capacitive coupling between relay contact(AC220V) and relay coil.(Kind of common mode noise)But, I was not true.When just I connect the one 24V SMPS(for Protective Relay[EMC Passed]) and connect the external ac cord (without or with small load).and I just directly check DC 24V line without load using oscilloscope.But, 24Vdc was ringing (tens of nano seconds, almost down to 0~5V).I used each long AC line to seperate phigically.MCU was not malfunctioned for a long time.(there hasn't been no problem)But. I'm not sure what it is and what could be happend by this ringing wave form.Did you have this kind of experience?

author: fourtytwo42
author_rank: Super Contributor
timestamp: January 26, 2025, 09:51:24 am
content: HelloA picture of your circuit with the ESP32 & relay would help.What are you using to drive the relay ?

author: JinhoAhn
author_rank: Newbie
timestamp: January 27, 2025, 01:42:41 am
content: it's not relaed to MCU and Relay Drive.if there's only one 24V SMPS pulged in AC outlet and i check the output of DC line using Oscillocope.at that time, i plug a another AC Cord without load, 24V DC voltage is ringing during short period of time (hundreds of ns)will it be possible due to voltage reflection?I used another EMC Filter, X-Capacitor, decoupling capacitor for DC line.there's no effectiveness.does my potable oscillocope have problem? (40Mhz, china, MDS8207)

author: BennoG
author_rank: Frequent Contributor
timestamp: January 28, 2025, 07:14:53 am
content: You are probably picking up a little EMC with your scope wires.They act like a antenna when not shielded correctly.Benno
SAM4SD32C TWI will not send restart condition - Page 1
Forum section: electronics / general

author: calvingloster
author_rank: Regular Contributor
timestamp: January 27, 2025, 07:58:15 am
content: I am trying to get i2C working on a SAM4SD32C but cant get a restart condition to work?The process i am following (that does not work) is as follows:(Option A)1. Send Start2. Send write bit OR'd with slave address3. Get Ack from slave.4. Send the Address I want to read from5. Send Restart condition6. Read Register7. Send StopI can get it to work if I add a stop condition after step 4:(Option B)1. Send Start2. Send write bit OR'd with slave address3. Get Ack from slave.4. Send the Address I want to read from4b.Send Stop condition5. SendStartcondition6. Read Register7. Send StopThe problem with this is returns multiple bytes and not just one byte as expected. i am just trying to read the ID of the BMP180 pressure sensor and expect 0x55 in ruturn which i do get but i get 4 bytes after that as well. Why are these additional bytes being sent? I only asked for 1 byte to be read.If I don't send the stop condition like i do in option B then the buss hangs and the status register reads as followsTXCOMP = 0RXRDY = 0TXRDY = 1SVREAD = 1SVACC = 0GACC = 0OVRE = 0NACK = 0ARBLST = 0SCLWS = 0EOSACC = 0ENDRX = 1ENDTX = 1RXBUFF = 1TXBUFE = 1My i2C functions is as follows:Code:extern void i2cStart(uint8_t readWrite) //'W = 0' or 'R = 1'{//readif (readWrite == 1){REG_TWI0_MMR |= (TWI_MMR_MREAD);}//writeelse if (readWrite == 0){REG_TWI0_MMR &= ~(TWI_MMR_MREAD);}}extern void i2cStop(void){REG_TWI0_CR = TWI_CR_STOP;while (!(REG_TWI0_SR & TXRDY));while (!(REG_TWI0_SR & TXCOMP));}extern uint8_t i2cRead(void){REG_TWI0_CR = TWI_CR_START;//wait for recieved data ready flagwhile(!(REG_TWI0_SR & TWI_SR_RXRDY));return REG_TWI0_RHR;while(!(REG_TWI0_SR & TWI_SR_TXCOMP));}int main(){i2cStart(W);i2cWrite(BMP_ID);i2cStop();i2cStart(R);data = i2cRead();i2cStop();}In typing all this it has somewhat been a rubber duck and i have figured out that if i put the i2cStop before the data = i2cRead then it only reads one bit as I wanted but why is this?Code:int main(){i2cStart(W);i2cWrite(BMP_ID);i2cStop();i2cStart(R);i2cStop();data = i2cRead();}Option AOption BSend Stop before Read

author: calvingloster
author_rank: Regular Contributor
timestamp: January 27, 2025, 12:08:08 pm
content: Ok so the problem turned out to be that the stop condition needs to be set prior to reading the byte you want to NACK after.I feel like this is not the first time this has caught me out.I also read somewhere that the i2C standard does not care if you stop and then start again for a restart instead of starting without stopping. The only issue I see here is if there are multiple masters competing for the bus, if you release the bus it might be snatched up by another master.
32F769 starting pains - Page 1
Forum section: electronics / general

author: IconicPCB
author_rank: Super Contributor
timestamp: January 23, 2025, 11:18:09 pm
content: Is there an idiot's guide to configuring / selecting peripherals ADC, DAC, I/O lines etc.Looking at the data sheet the component is quite complex hence the question.There is also the issue of I/O timing if I understand things correctly. A new concept to me.Why couldn't they have used their complexity for niceness.

author: langwadt
author_rank: Super Contributor
timestamp: January 23, 2025, 11:28:19 pm
content: https://www.st.com/en/development-tools/stm32cubeide.html

author: IconicPCB
author_rank: Super Contributor
timestamp: January 24, 2025, 06:17:32 am
content: installed... and now for the gnashing of teeth

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 26, 2025, 03:55:38 am
content: Are you introducing stm32 with a F7 series?It'll be quite large pill to swallow!

author: pcprogrammer
author_rank: Super Contributor
timestamp: January 26, 2025, 07:59:37 am
content: Based on a quick scan the GPIO peripherals in the F769 are no different than what is in the F3 and F4 series.The speed setting is comparable to drive strength in other MCU's and controls the steepness of the edges.There is a lot available in the F7 series, but if you take it one part at a time it is not that hard and principles are the same as for the smaller devices.Be aware of the clock enable and reset for the separate peripherals. These are found in the RCC peripheral and need to be controlled to make things work. If one wants to toggle an IO pin, make sure to enable the clock for the belonging IO peripheral.Everything can be found in the datasheet and reference manual.https://www.st.com/resource/en/datasheet/stm32f765bi.pdfhttps://www.st.com/resource/en/reference_manual/dm00224583-stm32f76xxx-and-stm32f77xxx-advanced-arm-based-32-bit-mcus-stmicroelectronics.pdfA lot of pages for sure, but way better than what is available for some of the MCU's from Chinese manufacturers like Allwinner, among others.
WCH website is borked - Page 1
Forum section: electronics / general

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 15, 2025, 01:03:58 am
content: Yes, the WCH website seems completely borked. Is it just me or for everyone else too?

author: squadchannel
author_rank: Frequent Contributor
timestamp: February 15, 2025, 02:16:37 am
content: yep, English pages is dead. 404.

author: Nominal Animal
author_rank: Super Contributor
timestamp: February 15, 2025, 04:44:51 pm
content: I happened to be looking at some chip specs yesterday, and noticed their server having occasional hiccups. Now, their Nginx frontend no longer has any access to the actual application server they use.

author: gamalot
author_rank: Super Contributor
timestamp: February 15, 2025, 04:52:20 pm
content: They have a Chinese websitewch.cn, or you can easily find data sheets for most of WCH's chips by going to lcsc.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: February 17, 2025, 07:48:54 pm
content: looks likehttps://www.wch-ic.com/is back up ?

author: SiliconWizard
author_rank: Super Contributor
timestamp: February 17, 2025, 11:44:31 pm
content: Yes it is. Looks like it got an overhaul. (They could have displayed a "maintenance" message instead, but oh well.)Also it doesn't look like it's fully completed yet. Some links on the international websitehttps://www.wch-ic.com/redirect to chinese pages. (Like if you click on "RISC-V MCUs")

author: qqclient
author_rank: Newbie
timestamp: February 26, 2025, 04:43:07 am
content: it also has a famous technique support forum but only in Chinese language,https://www.wch.cn/bbs/
[solved] STM32H725 SMPS issue - Page 1
Forum section: electronics / general

author: ubbut
author_rank: Regular Contributor
timestamp: January 21, 2025, 10:41:04 am
content: Solved: Is a STM32Cube bug:https://community.st.com/t5/stm32cubeide-mcus/default-settings-for-nucleo-h755-not-working-after-power-off/m-p/760162I am having and issue with a STM32H725RGV6.After powering my board, I can see the SMPS output at 1.36V, which I have connected to the VCAP inputs.I can also connect to the µC using the STM32CubeProgrammer.However, after flashing a simple firmware, the SMSP output drops to 0V and I can not connect anymore. I am aware that this can be the result of an improper SMPS configuration (https://community.st.com/t5/stm32-mcus/unable-to-connect-to-stm32h7-devices/ta-p/49296). However, in my (cube generated) project am am callingHAL_PWREx_ConfigSupply(PWR_DIRECT_SMPS_SUPPLY)so this should be correct. Additionally, I tried to upload a program with nothing but an infinite loop in main, and the problem still occurs.When pulling BOOT0 high, the SMSP output becomes 1.36V again and I can connect again. This makes me believe, that everything is set-up correctly hardware-wise. Otherwise, the bootloader would not run.This package does not have the LDO option by the way, otherwise I would just use that.thank you for your help

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 21, 2025, 09:33:19 pm
content: I didn't know that some variants of the STM32H7 didn't have an internal LDO. That's interesting.

author: hans
author_rank: Super Contributor
timestamp: January 21, 2025, 11:08:06 pm
content: Well all parts have the LDO, but not all parts have the VDDLDO pin exposed.Basically the switcher can be used to either supply VDDLDO, VCAP, and/or something external. Smaller packages don't have VDDLDO, so the only way to use it as a power saving feature for the internal core is to directly supply VCAP.But you could also have the SMPS supply the LDO, and have the intermediate voltage set at 1.8 or 2.5V to supply something external. Or, just wire VDDLDO to VDD, and then use the SMPS completely separate. Maybe for some applications the space/cost saving of a trading dedicated switcher with the MCU's internal one is a neat feature.
FP/M OS for rp2040 and others, inspired by CP/M and PC DOS - initial release - Page 1
Forum section: electronics / general

author: iMo
author_rank: Super Contributor
timestamp: January 21, 2025, 08:37:07 am
content: You may find the initial release of the "FP/M" embedded OS created by Serge (the author of the RetroBSD project, for example) athttps://github.com/fp-m/fpm-embedded?tab=readme-ov-fileQuoteSupported platforms so far:Quote

author: peter-h
author_rank: Super Contributor
timestamp: January 21, 2025, 09:43:22 am
content: I implemented CP/M on a number of machines in the 1980s so I knew it well.I wonder what this does. In the embedded world you are not normally running applications. The functionality is fixed. And if you need to start/stop various modules, FreeRTOS supports that, and if you have a heap, and can deal with fragmentation, you can even recover the RAM each one uses.FatFS and FreeRTOS work well.And if you like getting your hands dirty, you can even make the volume visible as a USB removable storage device (with some interesting caveats like the Host OS will not see file changes until the USB (MSC) device is unmounted and remounted.

author: westfw
author_rank: Super Contributor
timestamp: January 21, 2025, 10:34:33 am
content: QuoteA processor like the rp2040 is certainly capable of running “application like things” in the CP/m sense, sine it has far more ram than the average cp/m system, and flash much bigger than the 1MB floppies of the day.An “OS” that manages apps stored in flash and copies them to ram for execution is certainly possible, and interesting as an experiment. Whether it will do anything practical is a separate question.

author: peter-h
author_rank: Super Contributor
timestamp: January 21, 2025, 11:51:08 am
content: Indeed, whether it is of some use... is the Q.I did a product c. 1992 which had a user-visible file system, and CP/M would have been handy for that. I didn't use CP/M because it wasn't license-free, so I wrote my own very basic one. It was a user-programmable protocol converter. In another context, we legalised CP/M by purchasing a large pile of CP/M licenses, in the form of 8" floppy disks which were chucked in a box in case anybody questioned itfor about £20 each. Today, I would use FatFS and write some sort of UI for it.

author: SiliconWizard
author_rank: Super Contributor
timestamp: January 21, 2025, 08:05:42 pm
content: Yeah, I don't know if that's useful, but it's fun.For sure, the RP2040 has a ton more processing power and RAM than any Z80 CP/M machine. (Well, as for RAM, actually the Amstrad PCW machines had 256KB or 512KB of RAM and ran CP/M, but these were pretty much the last CP/M machines in early 90's. As to CPU, a Cortex-M0+ @100MHz easily outperforms a Z-80 @4MHz by a factor of 100 to 200!)