hybridfree/eevblog-posts huggingface dataset:
STM32 + CS4344 I2S audio DAC - Page 1
Forum section: electronics / general

author: gab_22
author_rank: Contributor
timestamp: January 10, 2024, 09:31:18 pm
content: Hi everyone!I'm trying to understand how to use the I2S feature of STM32 cores, in particular, on the STM32F303RE and a low-cost CS4344-based dac board (this oneeBay auction: #174915064977).My first goal is to play a sine wave through I2S fed by the DMA channel.Here, in the attachment, are the configurations for the I2S module and the DMAAnd here, is my codeCode:/* USER CODE BEGIN 2 */HAL_I2S_Init(&hi2s2);HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)sine2496, 512);/* USER CODE END 2 */Code:/* USER CODE BEGIN 0 */void HAL_I2S_TxCpltCallback(I2S_HandleTypeDef *hi2s){HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)sine2496, 512);}/* USER CODE END 0 */Code:const uint16_t sine2496[] = {16383,16383,16785,16785,17187,17187,....The samples of the sine table (despite its name it's a 16bits/48kHz sampling rate computed table) are duplicated to have the same signal on both stereo channels.But the sound at the output is not a sine wave. Fortunately, I have a logical analyzer and I sampled that :Marker 4: Frame one (see the table above) expected value on both channelsMarker 6: Unexpected values. I expected 16785 on the left and right channels.Marker 7: Correct values but wrong place (expected at marker 6)Marker 8: Unexpected values. I expected 17187 on the left and right channels.Marker 9: Correct values but wrong place (expected at marker 8 )etcI don't understand why I have these unexpected values instead of the correct values.The I2S signal frequency seems ok, I just need to check the MCLK with an oscilloscope because of the measured min/max/mean frequencies on the screenshot.Do you have any ideas?Thank you

author: mskeete
author_rank: Contributor
timestamp: January 11, 2024, 04:33:29 pm
content: Have you tried setting the data width to "half word" instead of byte?

author: gab_22
author_rank: Contributor
timestamp: January 11, 2024, 08:02:01 pm
content: Yes, and also with "word" setting. But the output is still not a sine wave.

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 12, 2024, 12:32:56 am
content: DMA configuration is wrong, width must be half-word, both src and dst.Also once the DMA ends, no more data is streamed through i2s, so you'll get "silence" chunks between each reloading, distorting the output.Set DMA to circular mode and it'll keep going forever without needing that ISR (Remove HAL_I2S_TxCpltCallback), the DMA will reset itself to the beginning of the buffer when done.Remember HAL_I2S_Transmit_DMA size is number of dma transfers, not bytes.With DMA in half-word, sine2496 must have 512 samples here:HAL_I2S_Transmit_DMA(&hi2s2, (uint16_t*)sine2496, 512);If playing a signal, use half-transfer and transfer complete ISRs to update each half of the buffer, this way you' won't run into buffer underrun problems, if you get clipping noises the buffer might be too small, causing underrun.I played with this during the pandemic, check:https://github.com/deividAlfa/STM32F411-Black-pill-USB-WAV-MP3-player
CAN Interrupt Handle Function Problem - Page 1
Forum section: electronics / general

author: wolfchip
author_rank: Newbie
timestamp: January 17, 2024, 09:04:03 am
content: Hallo, I'm currently using TC234 AURIX TriCore as my main ECU. How can we know at which point the hardware will trigger CAN Tx-Rx Interrupt Handle Functions? Based on the example from AURIX, it seems that ISR Functions are called once the Tx-Rx Interrupt has been generated. However, I don't know whether which bit(s) is/are SET or CLEAR by user or hardware to trigger those functions? Thank you
Please  review  my response  - Page 1
Forum section: electronics / general

author: Dadu@
author_rank: Contributor
timestamp: January 11, 2024, 03:19:26 pm
content: I am not sure if this is right place to ask this question here. I recently had an interview for an embedded software developer position, and I asked about I2C communication. I explained it as a way for devices to exchange data using signals called SDA and clock. It works one-way at a time, either sending or receiving.For writing:- The master generates starts condition.- It addresses the slave by sending the device's 7-bit address with a write bit (R/W = 0).- once the slave acknowledges.- Data is sent from the master to the slave.- After each byte, the master waits for acknowledgment.- Master generates stop conditions.For reading:- Similar start.- Master sends the slave's address with a read bit (R/W = 1).- Slave acknowledges.- Data is sent from the slave to the master.- Master acknowledges except for the last byte.- Ends with a stop condition (P).Could someone review this explanation and suggest any improvements or corrections? I want to ensure I'm providing a relevant and accurate explanation during interview

author: DavidAlfa
author_rank: Super Contributor
timestamp: January 11, 2024, 03:40:28 pm
content: Pretty exact I'd say

author: dobsonr741
author_rank: Frequent Contributor
timestamp: January 11, 2024, 03:53:55 pm
content: Overall good answer. Gave though one opportunity to the interviewer to drill into to your intro part, where you said “works one-way at a time”. Your answer is more accurate than this statement, where you pointed out the read is combinations of send/receive, and the acknowledgements are also change the direction of driving the line in the middle of the communication.There are other things to say, to show off your knowledge of different areas: how is it fit into the family of serial interfaces, addressing, bit stretching, the electrical specs (pull-up, bidirectionality), and the future, like I3C.

author: newbrain
author_rank: Super Contributor
timestamp: January 11, 2024, 04:22:26 pm
content: Pretty good overview.A couple of small comments:The master or slave do not really "wait" for an ACK, but rather expect them.You could extend the description with the very common case of restarts, where a start condition is sent without a prior stop, usually when a specific register in the slave needs to be read: the master writes the register address, then restarts and reads the data.
WTD - Motorola DSP56000 SLAM (100pin ceramic) pinout / DSP56001 Datasheet Supp't - Page 1
Forum section: electronics / general

author: philpem
author_rank: Frequent Contributor
timestamp: June 05, 2022, 12:34:03 pm
content: Does anyone happen to have a copy of the pinout for the 100-pin "SLAM" (single-layer aluminium metallised) version of the Motorola DSP56001?This was apparently published in the DSP56001 Data Sheet Supplement - according to this document:http://downloads.atari-home.de/Scene_Demos/!MAGS/!BONUS/DOCS/FALCON/DSPTXT.TXTI've just picked up a bunch of these chips at a swapmeet and I'd like to use them for something silly and frivolous!

author: tpfaff100
author_rank: Newbie
timestamp: January 07, 2024, 04:40:23 am
content: I have a couple of 56000 DSP boards that use that SLAM package. Given a few weeks I could probably arrange pictures.What I'm looking for is the C Compiler/cross-compiler to check out. Also need to see if my NeXTStation/RISC (PA-RISC) has the 56000 assembler... I think it got recompiled for the NIHS release of NeXTStep.Also I need some of the SLAM packages for that incarnation of the 56000.Lots easier to route traces with those vs. the QLFP socket or whatever it's called.Did you get the cute white package or the dark gray colored 56001?
platformio esp-idf framework esp32-s3 freertos not working properly as expected  - Page 1
Forum section: electronics / general

author: Alex QW
author_rank: Contributor
timestamp: January 11, 2024, 05:51:20 am
content: Hi guys,"My PlatformIO log output isn’t functioning correctly; it fails to provide real-time updates of the FreeRTOS producer and consumer integer values. It displays only two lines, as illustrated in the image below.My ‘menuconfig’ log output settings are already set to ‘verbose’. I have successfully uploaded the FreeRTOS program, and the log output is configured for verbose reporting. The expected output should resemble the image with a black background.Does anyone have any suggestions?"FromAlex.
Design Insight Between Voltage Levels 1.5, 1.8, 2.775, 3.0, 3.15, 3.3 and 5 VDC - Page 1
Forum section: electronics / general

author: tarun172
author_rank: Regular Contributor
timestamp: January 03, 2024, 10:52:20 pm
content: Hi Everyone,Recently, while working on a design consisting of an FPGA and an ARM A8-based processor, I came across non-standard voltage levels such as 1.5, 1.8, 2.775, 3.0, and 3.15. After reading through the datasheets and reference manual, I understood that these nominal voltage levels are part of chip design, meaning I will need to design an interface circuit using voltage level shifters. I wondered why chip designers came up with non-standard voltage values like 1.5, 2.775, or 3.15 VDC. I understand that the purpose of the 1.8 V and 3.3 V logic levels was to reduce over-chip power consumption. Does anyone know anything about this specification for chip design?Example: The image processing unit pins on the i.Mx. processor from NXP specify 2.775V as nominal voltage rating.Spartan-6 Vccaux pin provides the option to use 2.5V or 3.3V DC.Thanks,tarun172

author: ataradov
author_rank: Super Contributor
timestamp: January 03, 2024, 11:51:15 pm
content: 2.775 V happens a lot. It is not as standard as 3.3V, but it is a very common voltage in high-level system. No idea why this specific value is used. It is 11% over 2.5 V. This is the only rationale I can come up with. Something like 10%+a bit.But the overall range of values has the same goal - reduce power consumption. But it is much less coarse than simple 1.8 V or 3.3 V. There are lots of things that can't work at 1.8 V and don't need 3.3 V. And on a PC motherboard consuming 100s of Watts, every bit you can save matters, and given the complexity of the system, one more voltage regulator is not a huge deal.In case of the image processing unit, I think MIPI uses that as a standard voltage too.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 05, 2024, 05:01:23 pm
content: 3.3v 1.8v 1.275v 1.1v an 1.0v even an 0.8v in my company fpga circuits, Zynq based with ultra high speed adc'si have about 10 different voltages on this pcb
RDC Loader Tool - Page 1
Forum section: electronics / general

author: pant3k
author_rank: Newbie
timestamp: January 05, 2024, 08:26:47 am
content: Hello,Some have copy o of files visible here:https://www.mmnt.net/db/0/0/ftp.prochip.ru/Support/RDC/R8610especially RDC Loader Tool aka DT Loader (for jtag debug) ?
USB SAMD21G18 to ATMega328P programmer - Page 1
Forum section: electronics / general

author: IvoS
author_rank: Frequent Contributor
timestamp: January 01, 2024, 03:21:47 pm
content: I have a project using ATMega328P(already written code) and I need to add some kind of USB programmer to it for the future program changes. I am limited by space so I am looking for smallest thing possible. I found this:https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html. This can be directly soldered to my board. Now, I am dealing with 2 different voltages. ATMega328P is 5V, SAMD21 is 3.3V. My guess is that MISO/MOSI voltage levels will be a problem. Any advice appreciated.

author: coromonadalix
author_rank: Super Contributor
timestamp: January 01, 2024, 04:00:25 pm
content: why complicate thingshttps://github.com/UnfinishedStuff/CH340Csimple, not costly, maybe slower, but low part count ... it depends if you need to reset the 328p, you would need to patch one pin with a capacitor ?https://www.sparkfun.com/products/15096https://www.ebay.com/itm/201656306805?https://www.ebay.com/itm/314481216983?

author: Ian.M
author_rank: Super Contributor
timestamp: January 01, 2024, 04:29:20 pm
content: That's fine if the ATmega328P has a serial bootloader installed. If not, you need a USB chip capable of AVR ISP, preferably supported by AVRDUDE (See: option -c list of programmers). There are a couple of options here - use a FTDI USB UART e.g. FT232R and some others, or copy Arduino and use an ATmega16U2, which comes with a DFU bootloader that allows you to load different firmware to change its role e.g. make it an Arduino serial bridge or make it an AVRISP MK II programmer, supported by AVRDUDE and Atmel Studio.https://fedevel.com/blog/how-to-flash-arduino-bootloader-without-a-programmer.However if you have source for the project, porting it to an ATmega32U4 would make far more sense. That's the AVR used on the Arduino Leodardo, with native USB device support, so no USB interface IC required.

author: rteodor
author_rank: Frequent Contributor
timestamp: January 01, 2024, 06:43:35 pm
content: USBasp could be an optionhttps://fischl.de/usbasp/It uses an ATMega8/88 with USB protocol implemented in software. There are better solutions but this one could be tolerable in an one off project. And it works well.You can drop most of the parts in the USBasp schematic, even the crystal.
HV5812 - Page 1
Forum section: electronics / general

author: franksterb92
author_rank: Contributor
timestamp: December 30, 2023, 08:13:00 am
content: I'm kind of confused to how to drive this chip the function table in the datasheet confuses me could someone explain how this works

author: ttt
author_rank: Regular Contributor
timestamp: December 30, 2023, 08:58:22 am
content: Quote from: franksterb92 on December 30, 2023, 08:13:00 amThat table is hilarious. Search on github.com for some sample code like this which looks pretty straight-forward:https://github.com/Wiles/HV5812/blob/master/HV5812.ino

author: franksterb92
author_rank: Contributor
timestamp: December 30, 2023, 11:32:59 am
content: So far from what ive gathered the 20 bits each bit Is clocked in by a low to high transition of the clock pin and a low to high transition of the strobe pin sends the data to the output pins so say if I want the output pins 1 and 4 high and the rest low I'd make data 1 then clock 1 data 0 clock 1 data 0 clock 1 data 1 clock 1 and data 0 for the rest of the bits then make strobe 1 to set the outputs
AVR- Event system  - Page 1
Forum section: electronics / general

author: sanka1p
author_rank: Contributor
timestamp: January 04, 2024, 06:17:26 pm
content: Hi All,I am using Atmega1608, My question is Can i use Event User as an Event generator simultaneously. For exampleA(Event Generator) -> B(Event User/Generator) -> C(Event User)Is this possible?
NUVOTON NUC980 (ARM926EJ-S) - Non OS DMA transfer to GPIO - Page 1
Forum section: electronics / general

author: up8051
author_rank: Frequent Contributor
timestamp: December 10, 2023, 01:21:07 pm
content: Hello,Does anyone use Nuvoton's NUC980 processor?I'm trying to start DMA transmission (Memory -> GPIO) triggered by Timer0 but I can't do it.Non OS firmware.Regards,JarekC

author: up8051
author_rank: Frequent Contributor
timestamp: December 14, 2023, 01:03:14 pm
content: I managed to get contact information for Nuvoton FAE, but no response yet.Nuvoton has a technical forum but it is currently closed, you cannot register.Nuvoton seemed to be quite a well-known brand and I was hoping for better support.But as you can see, it's better to stick to popular brands (NXP, STM, Microchip....).The NUC980 seemed like a good choice because of its small footprint (TQFP64) and plenty of RAM 32/64MB.If my problem is not solved quickly, I will probably change the chip to STM32H7xx and external Dual QSPI PSRAM.BR JarekC

author: up8051
author_rank: Frequent Contributor
timestamp: December 25, 2023, 05:10:03 pm
content: Unfortunately, after two weeks of contacting Nuvoton support, I did not receive any advice on how to solve the problem.There are already 6 people from Nuvoton on the mailing list, but no response regarding technical issues.If the problem cannot be solved by the end of the year, I will change the processor to STM32H7xx (I have already ordered starter kits).The conclusion is that before you choose a processor for a project, check the support.BR JarekC

author: jnk0le
author_rank: Regular Contributor
timestamp: December 26, 2023, 12:14:36 am
content: QuoteIn this case, make sure to source parts with "OCTO SPI" peripheral as the "QSPI" doesn't work with PSRAMs as expected.

author: up8051
author_rank: Frequent Contributor
timestamp: December 26, 2023, 08:38:18 am
content: Quote from: jnk0le on December 26, 2023, 12:14:36 amCan you provide more details?

author: up8051
author_rank: Frequent Contributor
timestamp: December 26, 2023, 11:46:37 am
content: I am completely disappointed.According to FAE, NUC980 cannot transmit data via DMA from RAM to GPIO, there is no information about this limitation in the Technical Reference Manual.

author: jnk0le
author_rank: Regular Contributor
timestamp: December 26, 2023, 09:18:45 pm
content: Quote from: up8051 on December 26, 2023, 08:38:18 am"QSPI" peripheral doesn't support writes in memory mapped mode as well as refreshing.
error writing program - Page 1
Forum section: electronics / general

author: nassih
author_rank: Newbie
timestamp: December 25, 2023, 11:04:32 am
content: hi every on ,i have exported binary file from target memory of tms320f280 using uniflash jtag mode with xds100,the problem is when i want to load the file on another chipe i have an error ( C28xx: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map)

author: jpanhalt
author_rank: Super Contributor
timestamp: December 25, 2023, 11:29:24 am
content: Quote from: nassih on December 25, 2023, 11:04:32 amI am not familiar with your system; however, that's the sort of error MPLab 8.92 might give if the configuration of the programmer/assembler is set to a different chip than the one for which the code was written.

author: nassih
author_rank: Newbie
timestamp: December 25, 2023, 11:59:15 am
content: tanks for reply,I am not familiar with this jobs but need help,I spent several months looking for a solution to finish this operation, but without success. I am a technician on the hardware side and I know nothing about the software side except basic things.tanks​
Analyzing FLASH - Address does not point to reset_handler, but program works? - Page 1
Forum section: electronics / general

author: eTobey
author_rank: Super Contributor
timestamp: December 22, 2023, 04:36:11 pm
content: What i learned is, that the first adress in a FLASH program is loaded into the SP. Then the next address is loaded to the PC, which points to the reset_handler that will be executed.But when analyzing the memory, it does not match.Its an STM32G431RBT6 and i use CudeIDE 1.12. And the data is from the memory while debugging, and from the buildanalyzerI am confused.

author: ataradov
author_rank: Super Contributor
timestamp: December 22, 2023, 04:52:55 pm
content: It should match, make sure that the Reset_Handler function is what actually in the vector table.Also, since bootloader is mentioned, make sure you are not confusing bootloader and the application.

author: eTobey
author_rank: Super Contributor
timestamp: December 22, 2023, 06:00:26 pm
content: I think i found my problem: A problem that is really annoying.I use Cube IDE, aka eclipse, and if you change the configuration, then "build" will build the current configuration, but the launch button will have the old configuration still in it.

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 22, 2023, 06:43:09 pm
content: Yes, build twice or right-click on the project / refresh.
Mplab 6 Universal binary problems on MacOS (Apple silicon) - Page 1
Forum section: electronics / general

author: newtekuser
author_rank: Frequent Contributor
timestamp: December 15, 2023, 05:28:24 am
content: Been using Mplab 6.00 on my M2 Pro MacBook using Rosetta w/o issues. Lately I noticed there are newer version of Mplab that are supposed to work without x86 translation out of the box, namely versions 6.05, 6.10 and 6.15.How do I know?https://support.apple.com/en-us/HT211861I followed the KB from Apple above and the binaries show as "universal".However, while I can successfully start the installation, it borks out at the end complaining about Java for x86 architecture. The Mplab IDE also crashes on load of course.Has anyone had any experience running these latest versions on Apple silicon? I'm surprised they can be installed even without Rosetta, but fail to run because not everything in the package was ported to Arm.

author: ivan747
author_rank: Super Contributor
timestamp: December 15, 2023, 04:33:29 pm
content: Sounds like it's not completely ARM yet. MacOS only asks you to install Rosetta once. Do you have it installed? For what it's worth, my experience has been great, I've never had any translation technology be so reliable as Rosetta. I've never had a program not work unless the author programmed it to refuse Rosetta.

author: nfmax
author_rank: Super Contributor
timestamp: December 15, 2023, 04:44:47 pm
content: Maybe check that you have an Apple Silicon native Java JVM installed?

author: newtekuser
author_rank: Frequent Contributor
timestamp: December 16, 2023, 10:52:23 pm
content: The installer throws the error based on the architecture of the java file included in the installation package. Does not look like these version are fully ARM ready yet.I suppose I have to settle with using Rosetta for now, which fortunately has served me well.

author: fchk
author_rank: Frequent Contributor
timestamp: December 21, 2023, 01:40:21 pm
content: Microchip says:https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide"MPLAB X IDE only supports computers with processors designed with Intel® 64 or AMD® 64-bit architectures."Sounds clear, right?

author: newtekuser
author_rank: Frequent Contributor
timestamp: December 21, 2023, 07:15:38 pm
content: Quote from: fchk on December 21, 2023, 01:40:21 pmClear as mud. The statement above confirms what I'm seeing. However, the MPLAB X IDE binary included in the last two versions is identified as Universal which means it should run on ARM as well. According to wikipedia:https://en.wikipedia.org/wiki/Universal_binaryQuote
mcu adc reads fluctuating voltage output from opamp - Page 1
Forum section: electronics / general

author: darkc0der
author_rank: Newbie
timestamp: December 20, 2023, 01:50:02 pm
content: Hi, new here. I bought an lm324n and set up a non inverting amplifier to amplify voltage coming from a voltage divider. The output of the amplifier is then fed to my atmega8a adc. But the adc reads fluctuating voltage values like 0V,1V, etc. Sometimes voltage stays at 0V, and after a couple of serial prints it shoots back up. I know the adc is working properly since i get fairly stable and accurate readings when i skip the amplification altogether and directly connect the voltage divider output to the mcu adc.The circuit is messy due to all the wires. The ic on the right is the opamp and the one on the left is the mcu. For the non inv amp configuration both of the resistors are 1k to achieve a gain of 2.Also see the attached files below, the unit is volts:

author: darkc0der
author_rank: Newbie
timestamp: December 20, 2023, 04:23:59 pm
content: There was an internal disconnect in breadboard, issue is SOLVED now
uPSD33xx security bit set - Page 1
Forum section: electronics / general

author: TRN
author_rank: Unknown
timestamp: December 19, 2023, 07:44:49 pm
content: Does anybody have some experience/ knowledge about side channel attacks (e.g. glitching etc) of the STI uPSD33xx (8051) MCU's?I am trying to debug some firmware, do not have the source code, and the UPSD3354DV MCU has a security bit set, which prevents debugging Flash memory access.
How to see the value of W register and other general purpose registers in MPLAB  - Page 1
Forum section: electronics / general

author: khatus
author_rank: Regular Contributor
timestamp: December 23, 2023, 09:12:05 pm
content: I wanted to know the content of W register and content of the adress location 12H in pic 16f84 micrcontroller.I have write this simple codeCode:RES_VECT CODE 0x0000GOTO STARTMAIN_PROG CODESTARTMAINMOVLW b'11';// w contains 3MOVWF 12H ; // 12H contains 3MOVLW b'100'; // w contains 4ADDWF 12H, W ; // w contains 7ADDWF 12H, W ; // w contains 10ADDWF 12H, W; // w contains 13ADDWF 12H, W; // w contains 16ENDThe code was compiled successfully. Here is a picture of itBut the problem is when I open the SFR View window (Window>PIC memory views>SFRs) to see the content of the w register of the target device for the current project.It shows WREG content is 19. Even if I do not write the code it shows WREG content is 19. That means The code I wrote is not affecting the ‘w’ registers at all.since the result will be 16 . My question is how I can view my correct answer in MPLAB ide?

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 23, 2023, 10:07:35 pm
content: You have to run the simulator and then step the code.Proteus can also simulate PIC, but not sure if the demo does.For learning purposes, "Proteus Professional v8.16 SP3 Build 36097" can be easily found in Google.

author: 8goran8
author_rank: Contributor
timestamp: December 23, 2023, 10:20:24 pm
content: Everything is fine with your example. You have to start the debugger and go through the code step by step.

author: khatus
author_rank: Regular Contributor
timestamp: December 24, 2023, 03:36:02 am
content: Hello, i wanted to see,1) your full code2) Your full window screenshot3) your mplab versionIS it possible for you to post screenshots step by step? Because I am new in this field?OR make a video and send me the link?

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 24, 2023, 09:50:10 am
content: Just set it for simulation, takes 30 seconds, check the video!

author: jpanhalt
author_rank: Super Contributor
timestamp: December 24, 2023, 10:20:09 am
content: It runs and does exactly as written, as others have also said.Device: PIC16F84IDE: MPLAB 8.92MPLAB SIMMPASM v.5.49
Segger J-Link Firmware - not working after update? - Page 1
Forum section: electronics / general

author: sean87
author_rank: Regular Contributor
timestamp: June 13, 2015, 05:30:27 am
content: Hi guys,I know its shit but I accidental flashed my **** segger j-link with official firmware and now I have lost itis there any hope to bring it back

author: smokeless0864
author_rank: Newbie
timestamp: December 19, 2023, 11:53:09 am
content: Did you manage to fix it?Was it original?

author: darkspr1te
author_rank: Frequent Contributor
timestamp: December 19, 2023, 12:47:32 pm
content: Google often has answershttps://uglyduck.vajn.icu/ep/archive/2019/05/Unbricking_a_SEGGER_J_Link_v9_debug_probe.htmlhttps://www.reddit.com/r/techsupport/comments/21twbc/i_bricked_an_arm_jtag_segger_jlink_can_i_unbrick/dakspr1te

author: GromBeestje
author_rank: Frequent Contributor
timestamp: December 19, 2023, 06:53:21 pm
content: What version is it? What does or doesn't it do?
Encryption function works in windows program, but not on microcontroller - Page 1
Forum section: electronics / general

author: eTobey
author_rank: Super Contributor
timestamp: December 18, 2023, 04:44:59 pm
content: I have made an encryption function, that i use for both a windows program and on a microcontroller (STM32G431). It works as expected on windows, but on the chip it doesnt.It use multiple bit shift and XOR. I already casted the function parameters to what they should be, but it still does not work.What else could also be different on these two systems?

author: PlainName
author_rank: Super Contributor
timestamp: December 18, 2023, 05:16:08 pm
content: QuoteSounds dodgy - why would you need to cast them? Are they not properly defined?Other than that, there is absolutely zero to go on here. Some code where it is failing would be useful. Even just saying what language and which compilers you're using would be a help!Windows is probably 64-bit, but that's so obvious and you surely aren't using 64-bit ints on Windows and casting to 32-bits on the STM. Has it worked previously on some other micro? Another desktop OS? Go on, give us some info...

author: Siwastaja
author_rank: Super Contributor
timestamp: December 18, 2023, 05:25:35 pm
content: Show the code.Generally, use stdint.h stuff and be careful with integer promotion rules.

author: nctnico
author_rank: Super Contributor
timestamp: December 18, 2023, 05:33:57 pm
content: Quote from: eTobey on December 18, 2023, 04:44:59 pmIf you need casting function parameters, then you are likely looking at alignment issues. Look whether the code accesses data to be encrypted in chunks more than 1 byte long. If so, this code is likely not portable.

author: eTobey
author_rank: Super Contributor
timestamp: December 18, 2023, 05:43:17 pm
content: I found the problem: just a few inches in fron of the screenI was so focused on my encryption function, that i did not check the parameters that were coming in. Guess what... Sometimes you got to focus, but sometimes you should not at all!
AVR: ATtiny816 How do I configure split mode for more PWM outputs? - Page 1
Forum section: electronics / general

author: smssk
author_rank: Newbie
timestamp: December 17, 2023, 06:06:30 am
content: I would like to avoid using any type of software PWM and get 4 hardware PWM outputs from an ATtiny816.The datasheet says that TCA can be put into a "split mode" where additional PWM channels can be added.I have very little experience at the hardware level of AVR and I am not sure where to start. Although I am learning, I am not sure how to follow the split mode initialization(screenshot included)Does anyone here have experience with this?Thank you in advance!ATtiny816 Datasheet:https://ww1.microchip.com/downloads/aemDocuments/documents/MCU08/ProductDocuments/DataSheets/ATtiny417-814-816-817-DataSheet-DS40002288A.pdf

author: ComradeXavier
author_rank: Contributor
timestamp: December 18, 2023, 12:54:47 am
content: Microchip app noteTB3217: Getting Started with TCAcontains an example of split mode.
Risk-V CH32v003 Must redo configuration before every upload. - Page 1
Forum section: electronics / general

author: MilesThatch
author_rank: Newbie
timestamp: December 20, 2023, 05:45:59 pm
content: Good day folks.I'm programming the CH32v003 chip using MounRiverStudio. Instead of going with a dev or evaluation board, it's just the standalone chip, soldered onto an SMD to DIP pcb for easy breadboard testing. I got the WCH link programmer, connected it to the chip by pins GND, VCC and SWIO (pin8) and it flashes the chip successfully. I've got a decoupling capacitor between GND and VCC as well.The issue is that after each flash, I need to go to the configuration panel and keep re-setting some uploading options every time before I can flash the code again. Otherwise it fails.I have a video demonstrating the problem:https://www.reddit.com/r/RISCV/comments/18mh8d6/stuck_having_to_set_configuration_before_every/First time I upload, I see this:After that, every time I try to upload, it fails and reports:This is the config window in MounRiver Studio I have to keep resetting:I'm not sure why this is happening. I have tried swapping out the chip for another, thinking maybe it's defective but the replacement behaves the same. Perhaps there's some kind of a toggle in the configuration of the upload routine that causes it to reset every time? Perhaps something I've missed in the initial project setup?

author: MilesThatch
author_rank: Newbie
timestamp: December 21, 2023, 11:58:35 pm
content: I got it!I had configured my serial TX port to pin 8, which is the SWIO pin for programming the ch32 chip. I've reconfigured it to use 5 so now I can program it repeatedly.

author: brucehoult
author_rank: Super Contributor
timestamp: December 22, 2023, 12:22:06 am
content: Yeah, it pretty much had to be something that you'd done, because it works usually.

author: MilesThatch
author_rank: Newbie
timestamp: December 22, 2023, 12:24:19 am
content: I do wonder, what if I only have pin 8 left, where it's a hardware design that requires the use of the programming pin for the purpose of device functionality. Is there a way to retain repeatable flashing without moving pins?

author: brucehoult
author_rank: Super Contributor
timestamp: December 22, 2023, 01:21:31 am
content: That's one reason people do development on the larger pin count packages, even if the final product will use e.g. the 8 pin package.I guess every chip family has a similar problem. For example I've used ATTiny85 a bit. Another 8 pin package. Programming uses three of the IO pins for standard SPI, and for this to function the RESET pin needs to be held low for the duration of programming. If you need to use all 6 non-power supply pins for IO then you no longer have a RESET pin and can't program the chip again. The AVR provides a way around this "High Voltage Programming", which applies +12V to the RESET pin.
TI Voyage 200 C programming anyone? - Page 1
Forum section: electronics / general

author: Martinn
author_rank: Frequent Contributor
timestamp: December 10, 2023, 08:39:25 am
content: Hi all, I have just purchased a used Voyage 200 calculator, out of curiosity mainly. I'm interested mainly in programming it - either in 68k assembler (I enjoyed that a lot in Sinclair QL times) or better C.Most of the sites on this topic seem to be down or not updated in a decade (TIGCC:http://tigcc.ticalc.org/), so this might be a lost cause.Does anyone still program for those 68k calculators?- Martin

author: brucehoult
author_rank: Super Contributor
timestamp: December 10, 2023, 09:21:44 am
content: Quote from: Martinn on December 10, 2023, 08:39:25 amHmm .. a calculator form-factor with long battery life that you can program in 68000 asm would be really cool.12 MHz 68000, 188 kB RAM, 2.7 MB flashNot bad.Quote"GCC has been updated to the 4.0.1-20050630"Omg. gcc 4. Yup, the latest and greatest in 2005.But why would you need a custom gcc rather than just using a current version of gcc or llvm? It's just a 68000.Just "apt install gcc-m68k-linux-gnu" on Debian/Ubuntu (including the same in WSL on Windows, or in Docker on anything) and you're in business.

author: Martinn
author_rank: Frequent Contributor
timestamp: December 10, 2023, 09:35:08 am
content: Quote from: brucehoult on December 10, 2023, 09:21:44 amEven better: There are tons of them on the used market for next to nothing (at least here in Switzerland).Quote from: brucehoult on December 10, 2023, 09:21:44 amWell, did C or GCC change that much in the last 20 years? It's an ancient language, actually more a highly advanced assembler.Also, there's tons of gritty details: Linker map, booting, ROM routine interfaces, hardware drivers etc... So I'd prefer some kind of working package (preferably with IDE, simulator and debugger) over a generic command line compiler.But the truth is: If I invest the same time I need to get those abandonware tools running into Android programming, I have a far greater return.Except of course for the coin cell operated, hardware keyboard graphical LCD unit.

author: Martinn
author_rank: Frequent Contributor
timestamp: December 17, 2023, 05:27:45 pm
content: I got a used Voyage 2000.Unfortunately, some keys did not work, self test identified 13 not working. Probably one scan line of the matrix is dead.Inspection, cleaning, resoldering did not help - and keyboard interfacing is done by the single non-documented TI ASIC on the board (read: goes straight into the junk bin).I take this as some higher power trying to tell me that I should not waste time on antique stuff with unmaintained outdated development tools, instead start going through an Android/Kotlin tutorial.
ESP32 Power with 18650 - Page 1
Forum section: electronics / general

author: ats3788
author_rank: Contributor
timestamp: November 25, 2023, 09:00:57 am
content: ESP32 Power with 18650I know it's a common question, I know the best, to use a LiPo Batteries but is in almost 2024, I look for a converter to powera ESP32.

author: tooki
author_rank: Super Contributor
timestamp: December 04, 2023, 10:38:00 pm
content: So… what’s your question? I see only word salad and not a single question mark.

author: liaifat85
author_rank: Regular Contributor
timestamp: December 16, 2023, 07:39:44 am
content: Quote from: tooki on December 04, 2023, 10:38:00 pmI guess he is looking for a voltage converter. That will convert the 2024 battery voltage to that of 18650.

author: tooki
author_rank: Super Contributor
timestamp: December 16, 2023, 12:35:13 pm
content: Quote from: liaifat85 on December 16, 2023, 07:39:44 amI don’t know what he wants, but what you said makes equally little sense.
Modbus TCP/IP device - Page 1
Forum section: electronics / general

author: Kittu20
author_rank: Regular Contributor
timestamp: December 18, 2023, 10:52:27 pm
content: Hello,I'm looking to learn about Modbus TCP/IP I have Arduino Mega and ESP32. I don't have a specific project in mind, but I'm wondering what Modbus device would be good for conducting experiments to learn more about Modbus TCP/IP.Any recommendations or guidance would be greatly appreciated.Thank you!"

author: nctnico
author_rank: Super Contributor
timestamp: December 18, 2023, 11:00:28 pm
content: Schneider electric has a modbus simulator (modbustester) you can download.https://www.se.com/us/en/faqs/FA180037/

author: woofy
author_rank: Frequent Contributor
timestamp: December 19, 2023, 09:53:44 am
content: Why was the advice here insufficient?https://www.eevblog.com/forum/microcontrollers/experiment-modbus-communication/msg5158218/#msg5158218

author: coromonadalix
author_rank: Super Contributor
timestamp: December 19, 2023, 11:48:48 am
content: yeah now its some sort of pleague here, not satified new threads are starting with theme variations
I.MX 8M Plus coprocessor flash/boot problem (remoteproc) - Page 1
Forum section: electronics / general

author: teleportboy
author_rank: Newbie
timestamp: December 11, 2023, 11:30:46 am
content: I'm trying to flash a Cortex-M7 coprocessor, but I'm encountering problems.My steps:1) Copy fw.elf to /lib/firmware/2) Specify the firmware file name: echo fw.elf > /sys/class/remoteproc/remoteproc0/firmware3) Start the flashing process: echo start > /sys/class/remoteproc/remoteproc0/stateHowever, at step 3, there's an issue where the system immediately freezes after writing start to state, and to recover it, I have to reboot the machine.

author: krho
author_rank: Regular Contributor
timestamp: December 12, 2023, 11:32:03 am
content: I'm not using it. But I'd be surprised if you could directly upload the elf file. I suggest that you read the fine print regarding this.
ETH PHY: KSZ8091RNA versus LAN8742 - Page 1
Forum section: electronics / general

author: peter-h
author_rank: Super Contributor
timestamp: December 07, 2023, 10:42:37 am
content: Can anyone offer a view on these two?I am using the LAN8742 which is slightly cheaper. The KSZ8091RNA has some curious functions like a back to back mode for making an ETH repeater without a CPU... It also has some curious diagnostics but in an embedded system application you can't usually report anything anyway. It is also not clear if the STM32 supports it; there is a standard part to the management interface, plus a vendor-specific part.Both are Microchip but I suspect MC bought up two companies to get these two chips. The pinout is totally different.I would change from the LAN8742 only to get lower power.

author: bingo600
author_rank: Super Contributor
timestamp: December 07, 2023, 01:15:59 pm
content: Quote from: peter-h on December 07, 2023, 10:42:37 amMy gut feeling is that the K.... Phy's came from Micrel/Bingo

author: PDP-1
author_rank: Contributor
timestamp: December 08, 2023, 12:38:03 am
content: I have used both, started off with the LAN8742 and had to go to the KSZ8091RN(A/D) when I couldn't find any of the old kind in stock. I just got my KSZ8091 running earlier today.Other than the different footprints the changeover was pretty transparent to the code. I'm only using 'standard' register stuff and both chips were strapped to come up in auto-negotiation, I don't think I changed anything in my driver software to talk to them.If you did want to try the vendor-specific stuff it should be trivial, you already have the ability to read/write to the PHY registers so the rest is just playing with bit flags.I did find the documentation for the LAN8742 to be somewhat clearer and easier to read.

author: peter-h
author_rank: Super Contributor
timestamp: December 10, 2023, 06:58:39 am
content: The KSZ makes some claims re power management which made me wonder whether it would save significant power where ETH is used with a low duty cycle (which is usually going to be the case with 100mbit ETH). I found the PHY portion draws quite a lot of power. I posted about it herehttps://www.eevblog.com/forum/microcontrollers/how-fast-does-st-32f417-enter-standby-mode/msg4064983/#msg4064983

author: Scrts
author_rank: Frequent Contributor
timestamp: December 11, 2023, 03:15:56 am
content: I've used KSZ9021, KSZ9031 and some 10/100Mbps part I can't remember the PN. All worked very well.
help to read MCU firmware - Page 1
Forum section: electronics / general

author: nassih
author_rank: Newbie
timestamp: December 09, 2023, 11:49:40 am
content: hello I am trying to export the contents and parameters of a tms320f28021 memory with the uniflash tool via debugger xds100 v2, but the problem is that I cannot read all the contents of the memory; an error message appears: error memory map prevented reading 0x200000@data. Is the code is locked? If yes, is there a solution to unlock it? Is there another software similar than uniflash that can do this job?

author: jpanhalt
author_rank: Super Contributor
timestamp: December 09, 2023, 11:56:04 am
content: There are numerous studies and attempts to unblock/unlock chips. One method uses "decapping" followed by microscopic attachment to the chip. Here's an old reference to get you started:http://core.kmi.open.ac.uk/download/pdf/72289.pdf

author: nassih
author_rank: Newbie
timestamp: December 10, 2023, 12:34:37 pm
content: thank you for the answer and the link, first I want to know if the code is locked, because I can export part of the memory

author: nassih
author_rank: Newbie
timestamp: December 10, 2023, 12:39:45 pm
content: please the link is not working if you can send another tanks

author: jpanhalt
author_rank: Super Contributor
timestamp: December 10, 2023, 02:20:46 pm
content: I am sorry about that. I almost always check a link that I post, but I didn't in that case. Unfortunately, the pdf is too large to upload too.Just search on "decapping." That would lead to other references on bypassing firmware protection "fuses" and so forth.

author: KG7AMV
author_rank: Frequent Contributor
timestamp: December 12, 2023, 10:03:23 am
content: Hello, I quickly looked at the device options form my Xeltek programmer software I do not see any options for security or protection on that device.Some devices have alternate security/protection methods generally noted in the device info, this device had no notes but not uncommon for some devices to be missing the info. One common alternate method is that you need to edit the buffer at specific addresses basically a key. You may want to check the data sheet. Another is they lock out read attempts via SPI or other ISCP so can only be read in parallel mode.Update I did look at device config and it is most likely locked with the key type protection. So unless you send it out to a pro (decaping and extraction) You are prob not getting the contents)Form the look's of the device config they prob left some areas FFFF unlocked so part of the contents could be read such as serial number / model info but you are prob just getting jibberish on the read because its locked.
Exploits for GD/CKS/STM32f103 devices - Page 1
Forum section: electronics / general

author: darkspr1te
author_rank: Frequent Contributor
timestamp: December 16, 2023, 12:56:27 pm
content: Hi All,I've written prior about dumping code from stm32 devices, I have decided to release the code for some devices, others will follow once i clean up the files. But for now please find below the files for CSK/GD based f103x deviceshttps://github.com/darkspr1te/sraptor_exploit.gitFeedback welcome, mileage may vary, has worked on all CKS & GD devices tested so far,stm32f code & h/w mods needed to followdarkspr1te

author: CJay
author_rank: Super Contributor
timestamp: December 16, 2023, 03:40:18 pm
content: Useful and timely, thanks, I've got a project for this almost immediately

author: DavidAlfa
author_rank: Super Contributor
timestamp: December 17, 2023, 05:33:26 am
content: Did you try this?https://github.com/CTXz/stm32f1-picopwner

author: SiliconWizard
author_rank: Super Contributor
timestamp: December 17, 2023, 06:40:04 am
content: To be used only for educational or recreational purposes, of course.
AVR 0 Series- Reading flash Memory - Page 1
Forum section: electronics / general

author: sanka1p
author_rank: Contributor
timestamp: December 06, 2023, 10:25:00 pm
content: Hi All,I am using Atmega1608 and Microchip studio. I am trying to read data at a certain location in flash, how can I do that? I tried using pgm_read_byte(0x3FFE), but it didnt return any value? I filled my flash with 0xFF so it should be returning 255 at-least. Anything wrong here?

author: cv007
author_rank: Frequent Contributor
timestamp: December 07, 2023, 02:26:26 am
content: QuoteYou cannot have a return of no value, whether your address is valid or not. That function always returns a byte value of 0-255 so you got one of those values, and whether you used that return value or not you will still get the lpm instruction when using that macro.Flash access examples-https://godbolt.org/z/35PfxnoaxAny const var by default will be place in flash and given a virtual memory mapped address (for avr0/1/etc series), so accessing const vars requires nothing special (no need for the pgmspace macros). In your case, you simply want to read a flash address that is not a toolchain produced var so need to use any of the methods in the example above (which specify the memory mapped address, or if using the pgmspace macros the 0 based address).
FD-CAN-BUS: busy without beeing connected to bus (STM32G431) - Page 1
Forum section: electronics / general

author: eTobey
author_rank: Super Contributor
timestamp: December 05, 2023, 07:34:02 pm
content: Hi,i got stuck on the FDCAN on the G431. Trying to get messages and interrupt. Neither works. Strange state.I had made sure, that there is a signal and everything is activated that is needed (what i think/found). And then i just disconnected the bus, and still the state is busy.The output is:RxId: 0 RxLevel: 0 Status: 2One bit is exactly 2us.I guess its something with the init? There is not really anythin else running.

author: Dave
author_rank: Super Contributor
timestamp: December 06, 2023, 01:19:29 pm
content: Show us how your CAN transceiver is connected to the MCU.

author: eTobey
author_rank: Super Contributor
timestamp: December 07, 2023, 01:13:38 am
content: Never mind...HAL_FDCAN_Start sets the state as busy, and leaves with a HAL_OK.Busy is the new ready...I got to drop this HAL ASAP.