hybridfree/eevblog-posts huggingface dataset:
PIC24 MLA USB Joystick w/ 10-bit Axes - Page 1
Forum section: electronics / general

author: SrgntBallistic
author_rank: Newbie
timestamp: April 28, 2021, 08:01:21 pm
content: I've been trying to change the MLA USB Joystick example to pass 10-bit (0-1023) ADC data up to a PC as 2-4 axes. When they are set as 8-bit (0-255) like in the example things seem to work fine.I've tried updating the struct in the app_device_joystick.c file and the descriptor in the usb_descriptors.c file. I also updated the report size in the usb_config.h file. The device enumerates when I have the axes as 10-bit, however no changes to the button/axes show up in the windows game controllers window (they doe show up with 8-bit of course).I've been reading the USB specs. They note for Joystick physical min/maxes aren't usually needed. I've looked at examples from other MCUs and there's a lot of slightly different descriptors that work for them.app_device_joystick.c structCode:typedef union _INTPUT_CONTROLS_TYPEDEF {struct {struct {uint8_t BTN_1L : 1;uint8_t BTN_2L : 1;uint8_t BTN_3L : 1;uint8_t BTN_4L : 1;uint8_t BTN_5L : 1;uint8_t BTN_1R : 1;uint8_t BTN_2R : 1;uint8_t BTN_3R : 1;uint8_t BTN_4R : 1;uint8_t BTN_5R : 1;uint8_t SHFT_UP : 1;uint8_t SHFT_DWN : 1;uint8_t BTN_FNKY : 1;uint8_t BTN_ENC1 : 1;uint8_t BTN_ENC2 : 1;uint8_t BTN_ENC3 : 1;uint8_t BTN_ENC4 : 1;uint8_t BTN_ENC5 : 1;uint8_t ENC1_L : 1;uint8_t ENC1_R : 1;uint8_t ENC2_L : 1;uint8_t ENC2_R : 1;uint8_t ENC3_L : 1;uint8_t ENC3_R : 1;uint8_t ENC4_L : 1;uint8_t ENC4_R : 1;uint8_t ENC5_L : 1;uint8_t ENC5_R : 1;uint8_t ENC_FNKY_L : 1;uint8_t ENC_FNKY_R : 1;uint8_t: 2; //filler} buttons;struct {uint8_t hat_switch : 4;uint8_t: 4; //filler} hat_switch;struct {uint16_t X;uint16_t Y;uint16_t Z;uint16_t Rz;} analog_stick;} members;uint8_t val;} INPUT_CONTROLS;usb_descriptors.c reportCode:const struct {uint8_t report;} joystick_hid_rpt01 = {{0x05, 0x01, //USAGE_PAGE (Generic Desktop)0x09, 0x05, //USAGE (Game Pad)0xA1, 0x01, //COLLECTION (Application)0x15, 0x00, // LOGICAL_MINIMUM(0)0x25, 0x01, // LOGICAL_MAXIMUM(1)0x35, 0x00, // PHYSICAL_MINIMUM(0)0x45, 0x01, // PHYSICAL_MAXIMUM(1)0x75, 0x01, // REPORT_SIZE(1)0x95, 30 /*0x0D*/, // REPORT_COUNT(13)0x05, 0x09, // USAGE_PAGE(Button)0x19, 0x01, // USAGE_MINIMUM(Button 1)0x29, 30, // USAGE_MAXIMUM(Button 13)0x81, 0x02, // INPUT(Data,Var,Abs)0x95, 2, // REPORT_COUNT(2)0x81, 0x01, // INPUT(Cnst,Ary,Abs)0x05, 0x01, // USAGE_PAGE(Generic Desktop)0x25, 0x07, // LOGICAL_MAXIMUM(7)0x46, 0x3B, 0x01, // PHYSICAL_MAXIMUM(315)0x75, 0x04, // REPORT_SIZE(4)0x95, 0x01, // REPORT_COUNT(1)0x65, 0x14, // UNIT(Eng Rot:Angular Pos)0x09, 0x39, // USAGE(Hat Switch)0x81, 0x42, // INPUT(Data,Var,Abs,Null)0x65, 0x00, // UNIT(None)0x95, 0x01, // REPORT_COUNT(1)0x81, 0x01, // INPUT(Cnst,Ary,Abs)0x26, 0xFF, 0x03, // LOGICAL_MAXIMUM(1023)0x46, 0xFF, 0x03, // PHYSICAL_MAXIMUM(1023)0x09, 0x30, // USAGE(X)0x09, 0x31, // USAGE(Y)0x09, 0x32, // USAGE(Z)0x09, 0x35, // USAGE(Rz)0x75, 0x10, // REPORT_SIZE(16)0x95, 4, // REPORT_COUNT(4)0x81, 0x02, // INPUT(Data,Var,Abs)0xC0 //END_COLLECTION}};
PIC: Camellia 128-bit on a PIC16F - Page 1
Forum section: electronics / general

author: Dabbot
author_rank: Regular Contributor
timestamp: April 25, 2021, 12:11:53 pm
content: Here is a demo of the Camellia block cipher running on an 8-bit PIC microcontroller.Following from earlier efforts to write a Twofish-128 implementation, I decided to give Camellia-128 a go. This time it was much quicker as I knew what to expect, and the Camellia-128 algorithm turned out to be simpler to implement, so I spent more time optimizing.The program size is 2182 (V0.03) words, with 88 (V0.03) bytes of RAM used. It includes a lot of extra code for sending debug info via EUSART, but the cipher code and tables reside in their own areas, and debug calls are minimal and easily removed.A couple of IMPORTANT NOTES:- This implementation only uses 128-bit keys.- This implementation does not incorporate the final swap of the 8-byte ciphertext halves.- Key initialisation clobbers the plaintext / ciphertext registers X_00 to X_15, so init the key BEFORE writing to the pt / ct registers.V0.03 source code (picasm):PIC16F_Camellia_128_Demo_03.asmV0.03 output:PIC16F_Camellia_128_Demo_03_output.txtResources which helped:https://tools.ietf.org/html/rfc3713(This includes a good representation of the algorithm)https://info.isl.ntt.co.jp/crypt/eng/camellia/technology/https://info.isl.ntt.co.jp/crypt/eng/camellia/dl/support.pdfhttps://info.isl.ntt.co.jp/crypt/eng/camellia/dl/01espec.pdfhttps://info.isl.ntt.co.jp/crypt/eng/camellia/dl/cryptrec/intermediate.txt(Test vectors)Edit 1: Fix links
Rewriting Code in Internal Flash of stm32f439 - Page 1
Forum section: electronics / general

author: lordsant333
author_rank: Newbie
timestamp: April 28, 2021, 03:53:17 pm
content: Hi all,Im using the stm32f439 and looking to find a way to write code in the internal flash. Is there a protected area for quality assurance and security? It's supposed to be used for company's intellectual property.I would also like to know if there's a way to rewrite the system memory, I presume that it is the most protected area and couldn't find a way to write the code on it.I would really appreciate any help,Thanks!

author: ajb
author_rank: Super Contributor
timestamp: April 28, 2021, 04:28:58 pm
content: What exactly are you trying to store in flash? Application updates? Configuration data? Security keys?It's definitely possible to rewrite the program flash memory, bootloaders do that to update the system software all the time. It is not possible (at least as far as anyone outside of ST knows, probably) to rewrite any of system flash where the factory bootloaders are stored.All of the flash available for you to write is basically the same. No part of it is more or less secure than any other part. You can use the security features of the MCU (lock bits) to prevent others from reading out the memory, but if someone wants to copy your software bad enough these features can eventually be defeated.You can also use part of the internal flash memory for storing configuration, including device keys, in place of EEPROM or something. You would need to make sure that you don't accidentally overwrite that part of memory when doing a software update, and parts with lots of flash usually have large pages that make this not very efficient, but it can be done. If you need secure storage, then an external specialty security IC may be a better option. If you need configuration storage, an external EEPROM or FRAM might be better.

author: techman-001
author_rank: Frequent Contributor
timestamp: April 28, 2021, 09:42:04 pm
content: Quote from: ajb on April 28, 2021, 04:28:58 pmTotally agree with your advice. I reserve a 2kb sector of the STM32F103C8 flash in one of my Forth cores and while I can write to any location in it, to write a second time to the same location is only possible after that whole sector is erased.Regarding the factory bootloader code area, wouldn't it make sense to have it in rom and not flash which I believe is smaller and won't ever lose that code ?
after a few seconds stm32 running suddenly freezes - Page 1
Forum section: electronics / general

author: tariq
author_rank: Contributor
timestamp: April 20, 2021, 03:31:12 pm
content: I'm using stm32f101vbt6 by keil debugger after my program running for a few seconds micro freezes and main program stops so main clock stops .i increased min heap size and stack size but that doesn't helped me. in keil my program size is this:Program Size: Code=105880 RO-data=1156 RW-data=2500 ZI-data=10372in my codes I'm using RTC global interrupts , EXTI interrupts , TIM interrupts ,USART interrupts Is it because of interrupts?do i should do some thing about them that i don't know? or some thing else?i can't use IWDG because I'm using stop mode and i cant disable IWDG in stop mode.but even if i not using it that freeze should not be happen after 10 seconds my microcontroller starts.appreciate your help.

author: georges80
author_rank: Frequent Contributor
timestamp: April 20, 2021, 03:38:39 pm
content: Given your detailed explanation of what is happening and your hardware/software design, I'd say you either have a problem in the hardware or in the software, or both. That should narrow it down nicely for you.Seriously, do you imagine we have some kind of crystal ball here?cheers,george.
Cube IDE / STLINK V3SET / 32F4xx - 100% reliable, or not? - Page 1
Forum section: electronics / general

author: peter-h
author_rank: Super Contributor
timestamp: April 20, 2021, 03:31:22 pm
content: I have just moved from ST-LINK/V2 ISOL to STLINK-V3SET.The reason was to see if the SWV ITM debug mode was more reliable (or occassionally loses a byte or so), and I read somewhere that V3 is much faster.Well, V3 is much faster. Code download has gone from a few seconds (~200k) to something so fast I can barely see it. This is worth having especially in a production environment, and especially at 24MHz (which is what it turns out to use if you select Auto)But it isn't all that reliable. After some minutes Console says it has lost contact. At 8MHz it seems to be more reliable. I guess the quality of the wiring comes into it... I have about 30cm which is 20cm ribbon cable and 10cm single wires to my PCB. But even 8MHz is not 100% reliable. All speeds are 100% reliable for code download (well, it always reports as having verified) but in the long run with debugs it does eventually bomb out. I tried the debugger at 1MHz instead of 2MHz but it makes no difference.I am using SWV ITM debug because it is very fast - see here for actual numbershttps://www.eevblog.com/forum/microcontrollers/cube-ide-32f4-breakpoints-and-dynamic-printf-etc/msg3552164/#msg3552164Should I just accept that this stuff is a bit flakey and live with it? STLINK-V2 was rock solid in terms of the connection to the debugger, whereas V3 eventually loses the connection.If anyone can suggest anything else for me to try I would be very grateful.The other modes in the screenshot e.g. JTAG do not work, which is weird since JTAG is what this whole thing is supposed to be using. Only SWD works. The target connections areJT-SWCLKJT-SWDIONRSTJT-SWOJT-NJTRS (no connect)
after few programming debugger can't recognize microcontroller(stm32f101vbt6) - Page 1
Forum section: electronics / general

author: tariq
author_rank: Contributor
timestamp: April 13, 2021, 07:23:58 pm
content: hello every oneI'm using stm32f101vbt6 by st-linkv2 programmer.after few times programming my micro i get this message : no target connected. so my debugger can't recognize microcontroller.i checked every connection and its ok. so i changed micro and programmed micro few times and this problem happend again for three times.in my pcb design i connect SWDIO from programmer to micro and between them i put 330 ohm resistor.same thing for SWCLK as the picture uploaded.in my board when programming i'm connect my power plug on from adapteri don't know why this happening.is it because of ESD(Electrostatic Discharge)?Is my design has any problems?i didn't have this problem for stm32f103.appreciate your help.

author: techman-001
author_rank: Frequent Contributor
timestamp: April 13, 2021, 09:11:30 pm
content: Quote from: tariq on April 13, 2021, 07:23:58 pmTry releasing the reset button as you start the flashing program, to force the chip into SWD mode. Perhaps you have repurposed PA-13 or PA14 in your program ?

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 13, 2021, 09:40:30 pm
content: Use nRST when possible. If not, you must enable SWIO in the firmware so you can access anytime.But a bad programming will block SWIO.If that happens, just short nRST to gnd, click on conect and release reset.

author: tariq
author_rank: Contributor
timestamp: April 19, 2021, 05:54:22 pm
content: i got my answer here

author: bson
author_rank: Unknown
timestamp: April 19, 2021, 11:42:32 pm
content: The problem is the programmer resets the MCU (there's a magic SWD sequence for this), which after resent immediately starts executing code. The programmer then attempts to halt the processor, but there is a delay in the time it takes the halt to be issued, issued and so the MCU may already have executed your init code that configures SWD out of existence. The result is you can't gain control over it. If you hold RST# this means the programmer is sitting trying to halt by the time you release it and eventually you'll luck out and succeed.Needless to say, leave the debug pins until you're 100% confident everything else works reliably first, then by all means make minor changes to use them for something trivial that can easily be disabled if you need to debug some problem. But more specifically, I never do this in dev builds; in those if there's a problem and the firmware panics it will sit blinking a LED waiting for me to attach a debugger. The panic message will captured in a buffer, and the traceback will give me the location and stack context. This isn't possible if the pins have been reassigned (either that, or they need to be fiddled with in the panic handler, which I would recommend against also).
Help with C code - Page 1
Forum section: electronics / general

author: jeet55
author_rank: Contributor
timestamp: April 22, 2021, 09:16:16 am
content: so I want to register a callback which will be called whenever the DMA transfer is completed but I don't know how to register a callback I tried passing the function pointer but it's giving me errors. I am attaching the API below can someone please help me.

author: newbrain
author_rank: Super Contributor
timestamp: April 22, 2021, 09:36:29 am
content: Showing your code and the error you are getting would help us helping you...In general: the callback, according to the picture you posted, must be declared as a function returning void and taking a pointer to DMA_HandleTypeDef parameter.See a suitable declaration below:Code:void my_callback(DMA_HandleTypeDef *_hdma);

author: jeet55
author_rank: Contributor
timestamp: April 22, 2021, 09:44:15 am
content: and how do I pass it to register it?? should I just pass the function name?

author: newbrain
author_rank: Super Contributor
timestamp: April 22, 2021, 10:43:34 am
content: Quote from: jeet55 on April 22, 2021, 09:44:15 amYes, either the function name or the function name preceded by & are fine, see paragraph 9 of chapter 6.6 Constant Expression in C11 standard:Quote

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 22, 2021, 04:48:13 pm
content: Check the DMA callback IDs:Code:typedef enum{HAL_DMA_XFER_CPLT_CB_ID = 0x00U, /*!< Full transfer */HAL_DMA_XFER_HALFCPLT_CB_ID = 0x01U, /*!< Half Transfer */HAL_DMA_XFER_M1CPLT_CB_ID = 0x02U, /*!< M1 Full Transfer */HAL_DMA_XFER_M1HALFCPLT_CB_ID = 0x03U, /*!< M1 Half Transfer */HAL_DMA_XFER_ERROR_CB_ID = 0x04U, /*!< Error */HAL_DMA_XFER_ABORT_CB_ID = 0x05U, /*!< Abort */HAL_DMA_XFER_ALL_CB_ID = 0x06U /*!< All */}HAL_DMA_CallbackIDTypeDef;Given this:Code:DMA_HandleTypeDef dma1;void myDMAcallback(DMA_HandleTypeDef* dma){asm("nop"); // Whatever}Then register the callback:Code:HAL_DMA_RegisterCallback(&dma1, HAL_DMA_XFER_CPLT_CB_ID, myDMAcallback); // Register DMA transfer complete callbackThat just does this:Code:dma1.XferCpltCallback = myDMAcallback;It won't enable the DMA interrupt or anything else.Check__HAL_DMA_ENABLE_ITCode:__HAL_DMA_ENABLE_IT(&dma1, DMA_IT_TC); // Enable Transfer complete interrupt.And of course you need the DMA init code in first place.
Slow SPI transfer on STM32G031K8 nucleo - Page 1
Forum section: electronics / general

author: jeet55
author_rank: Contributor
timestamp: April 16, 2021, 03:30:48 pm
content: so I am interfacing an RGB OLED display (NHD-1.69-160128UGC3). I have set the SPI clock to 32Mhz and I am using HAL drivers. for some reason updating the whole display takes like a second. I am unable to understand why. please someone help me. I have attached my library files below.

author: tru
author_rank: Regular Contributor
timestamp: April 16, 2021, 04:00:42 pm
content: From the datasheet:https://www.newhavendisplay.com/specs/NHD-1.69-160128UGC3.pdfIf you look at the 4-wire SPI timing table (page 12), it shows tCYCS = 100ns (minimum), and if my conversion is correct that means the maximum SPI clock rate is 10MHz.You're overclocking it! Try setting the SPI to 10MHz or slower.

author: jeet55
author_rank: Contributor
timestamp: April 16, 2021, 04:10:47 pm
content: I know i am over clocking it. If i select frequency 10mhz and less it just becomes more slow.

author: errorprone
author_rank: Contributor
timestamp: April 16, 2021, 04:39:50 pm
content: Can try turning up the optimizations to see if it’s good enough. HAL functions are slow compared to direct register access. A oscilloscope would help determine which functions are causing the most delays.

author: SiliconWizard
author_rank: Super Contributor
timestamp: April 16, 2021, 04:55:01 pm
content: A quick look at your code shows that you're sending pixel data one pixel at a time in dedicated functions, each with a separate SPI frame. That's a LOT of overhead. If you want faster access, you'll need to do things differently, the faster way being to implement some framebuffer and sending whole blocks of pixels in one go through SPI.
Faster debugger than ICD-4 for PIC32? - Page 1
Forum section: electronics / general

author: ricko_uk
author_rank: Super Contributor
timestamp: March 16, 2021, 05:24:23 pm
content: Hi,I have been debugging code with an ICD4 and it is not exactly a rocket... Any suggestions for both:a) a faster similar tool? Perhaps that uses full USB-3 speed?b) a full in-circuit emulator (the original Microchip REAL-ICE is no longer available)?Thank you

author: fchk
author_rank: Frequent Contributor
timestamp: March 17, 2021, 07:39:44 am
content: Jlink via icsp or MIPS EJTAG.fchkhttps://www.segger.com/products/debug-probes/j-link/technology/cpus-and-devices/microchip-pic32-support/

author: westfw
author_rank: Super Contributor
timestamp: March 17, 2021, 09:36:55 pm
content: QuoteWhat exactly do you need to be faster?I seriously doubt that the USB connection is the bottleneck (It already has HS, 400+MBbps, right?)

author: ricko_uk
author_rank: Super Contributor
timestamp: March 17, 2021, 10:32:35 pm
content: Thank you both.fchk, that pretty much answers it.westfw, just generally, both real time debugging/stepping and programming. But I think the link above from fchk answers it.

author: voltsandjolts
author_rank: Unknown
timestamp: March 19, 2021, 10:11:46 am
content: Note the j-link page says:"J-Link fully supports super-fast, direct debugging viaJTAG"So if your device is MCHIP debug pins only (no jtag) it may be just as slow as PK4?

author: ale500
author_rank: Frequent Contributor
timestamp: April 11, 2021, 06:52:52 pm
content: MPLABX has some issues with jlink. Not all combinations of versions and firmware are compatible. At least on my jlink v9 (original), the latest firmware made it incompatible with mplabx, that was last year's latest FW. I may have had bad luck, I bricked the pickit 3 too, mplabx tried to update the fw on that too, and failed :/.But yeahm as long as it worked (I used mplabx 3.26 at the time and the original FW on the jlink) it was faster than the pickit 3, no idea how ICD4 fears.

author: ricko_uk
author_rank: Super Contributor
timestamp: April 11, 2021, 10:32:12 pm
content: Thank you allAle500, I got the J-32 Debug Probe sold by Microchip but made by Jlink (after speaking with Jlink I found out it is exactly the same but specific for Microchip).It is much faster to program BUT the MPLAB reset button (that sets/keeps the target into reset mode) does not seem to work with the jlink.
ARDUINO: Problem with geting custom atsame51j18a board to work with ARDUINO IDE - Page 1
Forum section: electronics / general

author: Cen3mode
author_rank: Newbie
timestamp: April 11, 2021, 07:01:26 pm
content: Hi,I've made a custom board based on the atsame51j18a microcontroller. This micro is already in use by Adafruit in their Feather M4 CAN. My problem is that the code in arduino seems to not run at all. I mean the custom build of the UF2 bootloader runs as it is supposed to and some bare metal code (simple blink) also runs without any issues. But when I flash the code in arduino (which flashes without a problem) it doesn't run. Can anyone help me? The arduino board files are attached. (variant.c is actually variant.cpp but I cannot attach .cpp files)Cen3mode
Timer 3 on ch559 - Page 1
Forum section: electronics / general

author: fabiodl
author_rank: Frequent Contributor
timestamp: April 10, 2021, 10:40:13 am
content: I am trying to have timeout interrrupts (overflow) for timer 3 of a CH559.As by the datasheet I set bT3_IE_END. I tried both setting/resetting bT3_IE_ACT (according to the datasheet it should be reset), but the interrupt is never called for overflows. In the following code, cnt is always equal to ok.To test I connect / disconnect the capture pin (P4.2) to a pin with an alternating signal (P1.0).If I set bT3_IE_ACT i can get cnt and ok increment together, but if I disconnect I get no increments of cnt (and not of ovf either, of course).What am I doing wrong?The maker's exampleshttp://www.wch.cn/downloads/CH559EVT_ZIP.htmlfor the timer do not provide any help for the overflow.My code is the following,Code:#include <ch55x/delay.h>#include <ch55x/CH559.h>#include <ch55x/uart0.h>#include <stdint.h>#include <stdio.h>void tmr3_setClk(uint16_t DIV){T3_SETUP |= bT3_EN_CK_SE;T3_CK_SE_L = DIV & 0xff;T3_CK_SE_H = (DIV >> 8) & 0xff;T3_SETUP &= ~bT3_EN_CK_SE;}volatile uint8_t cnt,ovf,ok;voidmTimer3Interrupt( void ) __interrupt INT_NO_TMR3{cnt++;if(T3_STAT & bT3_IF_ACT){ok++;T3_STAT |= bT3_IF_ACT;}if(T3_STAT & bT3_IF_END){ovf++;T3_STAT |= bT3_IF_END;}}void tmr3_setPin(bool alt){if (alt){PIN_FUNC |= bTMR3_PIN_X; //When this bit is 0, PWM3/CAP3 uses P1.2. When this bit is 1, PWM3/CAP3 uses P4.2}else{PIN_FUNC &=~bTMR3_PIN_X; //When this bit is 0, PWM3/CAP3 uses P1.2. When this bit is 1, PWM3/CAP3 uses P4.2}}void tmr3_start(){T3_CTRL |= bT3_CNT_EN;}void tmr3_stop(){T3_CTRL &= ~bT3_CNT_EN;}void tmr3_captureInit(uint16_t timeout,uint8_t mode,bool edgeInterrupt,bool timeoutInterrupt){T3_CTRL = 0;T3_CTRL |= bT3_CLR_ALL; //Clear T3 related registersT3_CTRL &= ~bT3_CLR_ALL;if (edgeInterrupt)T3_SETUP |= bT3_IE_ACT;elseT3_SETUP &= ~bT3_IE_ACT;if (timeoutInterrupt)T3_SETUP |= bT3_IE_END;elseT3_SETUP &= ~bT3_IE_END;T3_CTRL |= bT3_MOD_CAP ;//| bT3_CAP_WIDTH;T3_CTRL |= mode << 6;T3_END_L = timeout & 0xff;T3_END_H = (timeout >> 8) & 0xff;T3_FIFO_L = 0;T3_FIFO_H = 0;T3_STAT = 0xF0;}int main(){delay_ms(5);uart0_init(57600,false);printf("begin");tmr3_setPin(true);tmr3_setClk(12000);tmr3_captureInit(5000,1,false,true);EA = 1;IE_TMR3 = 1;P1_DIR|=0x01;while(true){P1^=0x01;delay_ms(1000);printf("cnt %d ok %d ovf %d\n",cnt,ok,ovf);}}
Program STM32 with another STM32 - Page 1
Forum section: electronics / general

author: ratatax
author_rank: Regular Contributor
timestamp: April 03, 2021, 10:57:32 am
content: I want to upload a firmware to an STM32 from another STM32 using UART. I implemented in my application the UART bootloader protocol described here:https://www.st.com/resource/en/application_note/cd00264342-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdfThe communication between the two devices works, I start the "slave" STM32 in system bootloader mode, I send write memory commands with the "master" STM32 with the data and it returns ACK which means it worked.Then I restart the slave STM32 in normal mode, but it doesn't do anything, even a gpio toggle program doesn't work.I'm not sure about the following things..- The compiled code of the program to upload (.bin compiled with STM32CubeIDE) should be written directly to 0x8000000 memory address, right ? (flash base address) I'm confused because some people seems to write the code after this address, then put some custom bootloader code at 0x8000000 to jump to it but it's not mandatory, isn't it ?- I haven't managed to make the Read Memory command to work for the UART bootloader protocol, so I can't check the written data. I followed exactly the document but I get only a 1 byte response that doesn't make sense, I even compared my code to this one (https://github.com/ARMinARM/stm32flash/blob/master/stm32.c) to make sure I was sending the right commands.I feel a bit stuck, I already did many things to remove them from the possible causes: using a different power supply, replacing the STM32 chip, checking all decoupling caps, using the internal oscillator to remove potential external crystal issues...

author: Siwastaja
author_rank: Super Contributor
timestamp: April 03, 2021, 04:44:42 pm
content: Did you remember to run erase command before writing?Check the .bin manually. The first two 4-byte words should be stack pointer initialization value, and the address of the init function.

author: abyrvalg
author_rank: Frequent Contributor
timestamp: April 03, 2021, 09:19:29 pm
content: Try reading out the flash content via SWD and compare it with the image you’ve programmed.

author: darkspr1te
author_rank: Frequent Contributor
timestamp: April 08, 2021, 01:45:13 pm
content: Quote from: ratatax on April 03, 2021, 10:57:32 amwhen dealing with stm32 and memory try and remember that you write to 0x000000 but execute 0x8000000,i would first read back the second stm32 memory dump and compare to your bin. You cannot write to un-erased memory , you have to erase each block first then write. memory has to be unlocked prior to writing /erasing.also confirm that your blink code does in fact work by flashing the second stm bin file directly via stlink or similar ,darkspr1te

author: camila
author_rank: Contributor
timestamp: April 08, 2021, 06:36:57 pm
content: Try AN3155, It will help you in this regard
control smps with atmega8 - Page 1
Forum section: electronics / general

author: vortex
author_rank: Contributor
timestamp: April 04, 2021, 12:06:18 pm
content: hi everyone i need help about controlling smps with pc817+ atmega8 and remove the tl431 saw i can get amps and voltage that i wantis pwm is the way to go or ther is an ather waythanks

author: DavidAlfa
author_rank: Super Contributor
timestamp: April 04, 2021, 12:53:11 pm
content: You can just modify the TL431 feeback and do exactly that

author: vortex
author_rank: Contributor
timestamp: April 04, 2021, 04:27:26 pm
content: i'm trying to make bench power supply from 0 to 50 volt 10 amps and i need some suggest on how to control pc817iam using codevision avr

author: David Hess
author_rank: Super Contributor
timestamp: April 09, 2021, 01:28:43 am
content: Keep the TL431 error amplifier and use PWM to make a variable current to drive into the summing point of the TL431 to adjust the output.
Profiling with QTrace probe by PDQLogic. Any good ? - Page 1
Forum section: electronics / general

author: gossamer
author_rank: Contributor
timestamp: April 04, 2021, 05:58:30 pm
content: Did anyone used this product/software for debugging/profiling code for CortexM mcu? I would like to use it for code profiling for hobby projects, so I cant justify the price of J-trace pro or uLink pro and I already have programmer so this seems like a nice addition.

author: ataradov
author_rank: Super Contributor
timestamp: April 04, 2021, 06:27:51 pm
content: I have not used this tool, but we have uLink Pro at work, and I tried to get the trace going a couple times with Keil. In all cases I had a very bad experience. ETM trace just did not work reliably and it was easier to debug things using traditional methods. I suspect most of this is due to Keil and its poor handling and reporting of errors, and other tools may work better.Also, QTrace is just the trace receiver, it has no programming capabilities. This alone tells me that the tools is not going to be great, since it would rely on code configuring the trace port. But to get really decent performance, trace received may need to change setting dynamically.
Which BLE GATT service is suitable for my application? - Page 1
Forum section: electronics / general

author: mathan
author_rank: Newbie
timestamp: March 29, 2021, 05:48:51 am
content: HI,My application needs to send the data from PC(server) to Nrf52840(client) . The length and type of the data are 2758 bytes and char data type, actually data has been stored in the 2758 char array which are pixel values of the display. Which bluetooth SIG defined profile and service is compatible for our application?Regards,Mathan Jeeva.

author: lucazader
author_rank: Regular Contributor
timestamp: March 29, 2021, 07:49:36 am
content: I Would either use the nordic uart bridge as an example.Or define your own custom service.

author: nuclearcat
author_rank: Unknown
timestamp: March 29, 2021, 08:54:38 am
content: BLE payload size max 20 bytes in BLE 4.0 and 4.1, and 244 bytes in newer. So you will have to define your own protocol to send this data in multiple "subpackets".
MS51FB9AE - Page 1
Forum section: electronics / general

author: 1230
author_rank: Newbie
timestamp: March 25, 2021, 11:29:45 am
content: Hi all,pls share whats the syntax in keil for pin read?and also if someone has some example for this controller, pls do share except that of BSP ones.Thank you

author: crossroad
author_rank: Contributor
timestamp: March 26, 2021, 02:43:42 am
content: I've never worked with nuvoton chips but it should have memory mapped peripherals.If you're not using any abstraction layer, you have to read from a specific register.With CMSIS and STM32 chips, it can look likeCode:variable = GPIOA->IDRThis stores the pin values of all GPIO pins to "variable" and the bit position corresponds to the respective pinsThis document should have everything you need for most things you want to do with that chip, if the manufacturer did their jobhttps://www.nuvoton.com/export/resource-files/TRM_MS51FB9AE_MS51XB9AE_MS51XB9BE_EN_Rev1.03.pdf

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 26, 2021, 03:22:41 am
content: Quote from: 1230 on March 25, 2021, 11:29:45 amMS51 is an 8051 cored part, so any of the keil docs for the 8051 are applicable.One example is8051 Bit I/O Example Programhttps://www.keil.com/download/docs/84.asp

author: PCB.Wiz
author_rank: Super Contributor
timestamp: March 26, 2021, 03:24:04 am
content: Quote from: crossroad on March 26, 2021, 02:43:42 amThe MS51 is an 8051 part, and that has direct boolean opcodes and boolean pin access.
Meaning of #define macro value - Page 1
Forum section: electronics / general

author: arul
author_rank: Regular Contributor
timestamp: March 22, 2021, 12:23:58 pm
content: Hi All,I want to know that meaning of #define macro.For exampleCode:#define PIN_PA08D_SERCOM2_PAD0 _L_(8)#define MUX_PA08D_SERCOM2_PAD0 _L_(3)#define PINMUX_PA08D_SERCOM2_PAD0 ((PIN_PA08D_SERCOM2_PAD0 << 16) | MUX_PA08D_SERCOM2_PAD0)In that above code (atmel product) , what is thevalueandmeaningof_L_(8 )and_L_(3)?Thanks...

author: grumpydoc
author_rank: Super Contributor
timestamp: March 22, 2021, 12:55:16 pm
content: Almost certainly one which expands to defining a "Long Int" constant - so same as saying "8L"

author: cv007
author_rank: Frequent Contributor
timestamp: March 22, 2021, 02:09:33 pm
content: cd sam_include_foldergrep _L_ *.hCode:#define _L_(x) (x ## L) /**< C code: Long integer literal constant value */Code:_L_(8) -> 8L

author: bson
author_rank: Unknown
timestamp: March 27, 2021, 05:09:17 pm
content: Almost as useful asCode:#define ZERO 0

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 27, 2021, 05:27:48 pm
content: Quote from: bson on March 27, 2021, 05:09:17 pmPretty much so.
STM32 Hardware AES - Page 1
Forum section: electronics / general

author: deadly_penguin
author_rank: Contributor
timestamp: March 24, 2021, 11:56:56 am
content: I'm writing an AES routine using the STM32WL's crypto peripheral.Encrypting data works fine and I get out what I would expect, but I can't seem to get that data to decrypt again.For testing I'm using a Key, IV, and data that are each 16 bytes of one number.My peripheral init and input routines are here:Code:void AES_Init(uint32_t* key, uint32_t* iv){RCC->AHB3ENR |= RCC_AHB3ENR_AESEN;AES->CR &= (0UL);AES->CR |= 0b01 << AES_CR_MODE_Pos; //Key derivation modeAES->CR &= ~AES_CR_KEYSIZE; //128 bit keysizeAES->KEYR3 = __REV(key); //Prepare key for decryptionAES->KEYR2 = __REV(key);AES->KEYR1 = __REV(key);AES->KEYR0 = __REV(key);AES->CR |= AES_CR_EN;while (!(AES->SR & AES_SR_CCF));AES->CR &= ~AES_CR_EN;AES->CR |= AES_CR_CCFC;//Clear comp. complete flag.AES->CR |= 0b10<<AES_CR_MODE_Pos; //Decryption modeAES->CR |= 0b001<<AES_CR_CHMOD_Pos; //CBC modeAES->CR |= 0b10 << AES_CR_DATATYPE_Pos; //Set byte reversalAES->IVR3 = __REV(iv);AES->IVR2 = __REV(iv);AES->IVR1 = __REV(iv);AES->IVR0 = __REV(iv);}void AES_InitE(uint32_t* key, uint32_t* iv){ //Just test encryptionRCC->AHB3ENR |= RCC_AHB3ENR_AESEN;AES->CR &= ~AES_CR_EN;AES->CR &= (0UL);AES->CR |= 0b00 << AES_CR_MODE_Pos; //Encryption ModeAES->CR |= 0b001<<AES_CR_CHMOD_Pos; //CBC modeAES->CR &= ~AES_CR_KEYSIZE; //128 bit keysizeAES->KEYR3 = __REV(key);AES->KEYR2 = __REV(key);AES->KEYR1 = __REV(key);AES->KEYR0 = __REV(key);AES->IVR3 = __REV(iv);AES->IVR2 = __REV(iv);AES->IVR1 = __REV(iv);AES->IVR0 = __REV(iv);AES->CR |= 0b10 << AES_CR_DATATYPE_Pos; //Set byte reversal}void AES_Acc_Block(uint32_t* cipherblock, uint32_t* plainblock){AES->CR |= AES_CR_EN;for (int i=0; i<4; i++) {AES->DINR = (uint32_t)(cipherblock); //Sequential read-in of the data}while (!(AES->SR & AES_SR_CCF));for (int i=0; i<4; i++) {plainblock = (volatile uint32_t)AES->DOUTR; //Sequential read-out of the data}AES->CR |= AES_CR_CCFC; //Clear comp. complete flag.}
PIC: Twofish 128-bit on a PIC16F - Page 1
Forum section: electronics / general

author: Dabbot
author_rank: Regular Contributor
timestamp: March 22, 2021, 10:42:44 am
content: Here is a demo of the Twofish block cipher running on an 8-bit PIC microcontroller.I wrote this as a learning experience, and to have available for future endeavors. And since I went through the effort, I may as well share it.The total program size of V0.08 comes out at 1856 words, with 100 bytes of RAM used. It includes a lot of extra code for sending debug info via EUSART.A couple of IMPORTANT NOTES:This implementation only uses 128-bit keys.This implementation does not incorporate the final swap of the 8-byte ciphertext halves.Versions 0.02 and 0.03 are VERY unoptimized in speed and code sizeV0.08 source code (picasm):PIC16F_Twofish_128_Demo_08.asmV0.08 test vectors:PIC16F_Twofish_128_Demo_08_output.txtV0.06 source code (picasm):PIC16F_Twofish_128_Demo_06.asmV0.06 test vectors:PIC16F_Twofish_128_Demo_06_output.txtV0.03 source code (picasm):PIC16F_Twofish_128_Demo_03.asmV0.03 test vectors:PIC16F_Twofish_128_Demo_03_output.txtV0.02 source code (picasm):PIC16F_Twofish_128_Demo_02.asmV0.02 test vectors:PIC16F_Twofish_128_Demo_02_output.txtResources which helped:https://www.schneier.com/wp-content/uploads/2016/02/paper-twofish-paper.pdfhttps://www.schneier.com/academic/twofish/download/https://www.schneier.com/wp-content/uploads/2015/12/ecb_ival.txt(This one helped a LOT)Edit 1: Fix attachment URLsEdit 2: Upload more optimized, cleaner code (V0.03)Edit 3: Upload much more optimized, cleaner code and bug fix in debug code (V0.06)Edit 4: Upload more optimized code (V0.08)
PIC24: I am not sure if ADC initialization is correct - Page 1
Forum section: electronics / general

author: Roma
author_rank: Newbie
timestamp: March 09, 2021, 07:25:12 pm
content: I am using a PIC24f to read analog inputs from a accelerometer. I am getting a input for AN0 but AN1 and AN2 the data does not seem to be right. I am only using ADC1BUF0 to read the data for each analog input.Here is the initialization:AD1PCFG = 0xFFF8; // select AN0, AN1, AN2 as analog inputAD1CON1 = 0x00E0; // auto convert @ end of sampling, Integer Data in.AD1CON2 = 0x0000; // use MUXA, AVss and AVdd used as VrefAD1CON3 = 0x1F01; // Tad = 2xTcy = 125ns. 31*Tad for conversion time.AD1CSSL = 0; // no scanning requiredAD1CHS=0;AD1CHS=1;AD1CHS=2;AD1CON1bits.ADON = 1; // Turn on the ADCIn main I set TRISBbits.TRISB0 = 1; and so forth for each analog input.Here is the code where I read the input.int SelectPort(int ch){AD1CON1bits.ADON = 0; // Turn off the ADC to reconfigureswitch(ch) // set values based on the channel to use{case 0: // select AN0 as analog inputAD1PCFG = 0xFFFE;break;case 1:AD1PCFG = 0xFFFD; // select AN1 as analog inputbreak;case 2:AD1PCFG = 0xFFFB; // select AN2 as analog inputbreak;}ms_delay(1);AD1CON1bits.ADON = 1; // Turn on the ADCAD1CHS = ch; // 1. select analog input channelAD1CON1bits.SAMP = 1; // 2. Start sampling.while (!AD1CON1bits.DONE); // 5. wait for conversion to completeAD1CON1bits.DONE = 0; // 6. clear flag. We are responsible see text.return ADC1BUF0; // 7. read the conversion results}I am just not sure what I am not doing right to get the data to be right for AN1 and AN2. If anyone can help me that would be great. Thanks

author: Roma
author_rank: Newbie
timestamp: March 10, 2021, 12:17:51 am
content: So it turns out after analyzing the circuit, my team member did not wire those 2 inputs (AN1 & AN2) lolSo the values of AN1 and AN2 are good but AN0 is a bit high but I'd have to look at the data conversion for the accelerometer.

author: JPortici
author_rank: Super Contributor
timestamp: March 10, 2021, 05:49:41 am
content: Always state the partnumber.There are quite a few PIC24 families, with very different ADC cores between them, some of which i was never able to make it work reliably (PIC24F KA, the very old 5V ones)Usually (not limited to PIC24) values "a bit high" are sign of too high source impedance and/or too low sampling time

author: abrarbaig
author_rank: Contributor
timestamp: March 10, 2021, 04:06:17 pm
content: Looks fine. If yo use AD1PCFG, no need to use TRISx,

author: Roma
author_rank: Newbie
timestamp: March 24, 2021, 04:23:56 pm
content: Yes the TRIS was not necessary in this case since it was doing nothing since AD1PCFG is being used.
Need Advice With Padauk Programmer - Page 1
Forum section: electronics / general

author: RegisX
author_rank: Newbie
timestamp: March 15, 2021, 07:04:17 pm
content: Hello. I Planing to buy Padaug programmer. LCSC Got only "PDK 3S-P-002" I buy many PMS154C and if got it right according to this site:http://www.padauk.com.tw/en/technical/index.aspx?kind=26I cant program PMS154C with PDK 3S-P-002 i need 5S-I-S02 to program. Did i correct ? And if I correct maybe someone sells programer hacked from github ?Sorry 5S-P-003https://lcsc.com/product-detail/Emulator_PADAUK-Tech-5S-P-003_C263009.htmlis programmer not debuger ? it work on PMS154C ?

author: homeworkboy
author_rank: Contributor
timestamp: March 19, 2021, 05:11:03 am
content: PADAUK Tech 5S-P-003 is writer.5S-I-S01 or 5S-I-S02/B is ice.
PIC24: I am not sure if I am getting analog values correctly - Page 1
Forum section: electronics / general

author: Roma
author_rank: Newbie
timestamp: March 24, 2021, 04:36:32 pm
content: I am using a PIC24FJ128GA010 board and a SPW2430 microphone which has a built in amplifier. I am connecting it to 3.3V from the PIC, ground and the DC pin of the microphone is going into a analog input port on the board. The adc value I am getting is 245. When I convert it to voltages using (mic_value*3.3)/1024 the value is 0.79. The output peak-to-peak voltage has a 0.67V DC bias and about 100mVpp (peak-to-peak) when talking near the microphone. Im assuming that for my board the dc bias is 0.79 so a bit high but I am not sure if that is correct.Basically what I am trying to do is capture the sound from the microphone and then graph it. Should I use the amplitude values instead of voltage values so the raw adc data? Do I need to add a capacitor or resisters? The datasheet for the microphone says using the dc output of the microphone and connecting it to adc input of a microcontroller is all what is needed. When I snap my fingers the values move, albet slow. But when I am speaking the values do not change if anything very little.I am new to using the pic24 and using a sensor to read analog values and then converting them. If anyone could help that would be really appreciated.
Zigbee Devices: Silabs vs Nordic  - Page 1
Forum section: electronics / general

author: ElektroHS
author_rank: Contributor
timestamp: March 16, 2021, 12:07:38 pm
content: Hi,I used Nordic like nRF52832 for development of home automatisation devices, but now I'm going to move to Zigbee technology.Anyone has experience with Nordic as well as Silabs microcontrollers with Zigbee support?I'm planning to buy both microcontrollers and check them on practice... but maybe already has experience and can advice - what is better to choose - Silabs or Nordic...Currently thinking about- Nordic nRF52840- Silabs like EFR32MG13All devices in the most cases are battery powered.Thanks

author: ricard2k
author_rank: Unknown
timestamp: March 16, 2021, 04:58:58 pm
content: I'm also interested in this question. Somebody can illuminate us with some experience?

author: ElektroHS
author_rank: Contributor
timestamp: March 16, 2021, 05:27:45 pm
content: Now I'm thinking about EFR32MG13 (~$5-8) from Silabs or nRF52840 (~$6-7) from Nordic. Price depends on the package.I don't know how support of Silabs, but Nordic has nice active forum. So you can get feedback from manufacturer directly in case of the most of issues...

author: ElektroHS
author_rank: Contributor
timestamp: March 16, 2021, 05:34:26 pm
content: the cost of development boards of Nordic nRF52840-DK - $50 is the same as Silabs EFR32MG13

author: SiliconWizard
author_rank: Super Contributor
timestamp: March 16, 2021, 05:40:06 pm
content: I'd favor Nordic for quality of support and product performance. That said, I have no specific experience with those using the Zigbee protocol. (Just raw 2.4GHz, and BLE.)Actually, my last exposure to Zigbee was years ago, using Xbee modules. I absolutely don't remember what chip they were using back then, but the current versions use a Silicon Labs EFR32MG, so...https://www.digi.com/products/embedded-systems/digi-xbee/rf-modules/2-4-ghz-rf-modules/xbee3-zigbee-3#specifications

author: ElektroHS
author_rank: Contributor
timestamp: March 16, 2021, 05:47:35 pm
content: Quote from: SiliconWizard on March 16, 2021, 05:40:06 pmThanksYes, their (Nordic) support one of "plus" for me.The most of my devices are battery-powered. Therefore if I'm going to try Silabs, then it will be EFR32MG13.So now I can say Nordic 1 vs Silabs 0 - will wait for other comments to make final decision

author: ElektroHS
author_rank: Contributor
timestamp: March 16, 2021, 05:50:52 pm
content: Another plan of testing - create the same devices, but with different microcontrollers: nRF52840 and EFR32MG13Next stages to check as minimum:- stability of signals / connections- battery usage- "usability"
Shifty Register behaviour - Page 1
Forum section: electronics / general

author: PerranOak
author_rank: Frequent Contributor
timestamp: March 15, 2021, 04:31:54 pm
content: I have a uC connected to a 74HC595 shift register.One GPIO0 is connected to HC595 "SER" (serial input) and GPIO1 is connected to both SRCLK and RCLK, i.e. tied together.This simple programme will only work(it just runs through 0-255 to show-up on the LEDs attached to the HC595 outputs)if I add-in the last "pulse" just before the delay (the delay just aids viewing):Code:while(1){for (int display = 0; display < 256; display++){for (int count = 0; count <8; count++){GPIObits.GP0 = (display >> count) & 1;GPIObits.GP1 = 1;GPIObits.GP1 = 0;}GPIObits.GP1 = 1;GPIObits.GP1 = 0;__delay_ms(1000);}}Without this extra, the numbers are not shifted far enough by one place.Is this because the RCLK requires the extra pulse to copy the shifted bits into the output "stage"?Cheers.

author: langwadt
author_rank: Super Contributor
timestamp: March 15, 2021, 04:41:06 pm
content: the output of the shift register will change slightly after SRCLK, so the when SRCLK and RCLK happens at the same time the output register will latch the data right before the shift

author: Jope
author_rank: Regular Contributor
timestamp: March 15, 2021, 04:43:30 pm
content: Quote from the datasheet (Philips), title page: "If both clocks are connected together, the shift register will always be one clock pulse ahead of the storage register."

author: PerranOak
author_rank: Frequent Contributor
timestamp: March 15, 2021, 05:11:47 pm
content: So, before I added the extra pulse it was “waiting” for another clock pulse. Cheers.
SAME51J18 SD 4 bit mode interface in arduino - Page 1
Forum section: electronics / general

author: Cen3mode
author_rank: Newbie
timestamp: March 15, 2021, 08:58:14 am
content: Hi,I'm currently in process of making a dev board with ATSAME51J18. It has a SDMMC peripherial which i would like to use for faster SD access speeds. I am planning to use it with arduino ide and i have no idea if there is a library which allows the use of that peripherial. Thanks in advance.Cen3mode
Proteus 8.6 - logic analyzer not working - Page 1
Forum section: electronics / general

author: panoss
author_rank: Frequent Contributor
timestamp: January 06, 2021, 12:29:02 pm
content: I 've made a project in Proteus. I 'm trying to use the logic analyzer.I start the simulation, the logic analyzer shows up on the screen, I click on 'Capture' button, but in the analyzer 's screenI see only straight lines. No pulse or something, like if it 's not working.I have tried every possible setting of it.In the attachments I have:- the Proteus (8.6) project (in it's name, change the '.jpg' to '.pdsprj')- and the hex file.Any help is welcome.

author: Helbino
author_rank: Newbie
timestamp: March 10, 2021, 11:36:00 pm
content: I'm also running into the same problem. I believe the logic analyzer has worked one time, but for the remainder it simply remains with the rose coloured 'capture' (as opposed to green).Pics attached.

author: Helbino
author_rank: Newbie
timestamp: March 11, 2021, 12:13:25 am
content: 1) I can't seem to open your picture2) I was able to figure out my problem. Ensure that you have the correct triggers (the tabs on the left hand side of the logic analyzer) and that your capture resolution is small enough to capture the pulses.One good method of ensuring you have a good trigger is to have all inputs to the far left (in terms of the trigger panel, left side) except your clock. Choose the rising edge or falling edge and see what comes up.

author: DavidAlfa
author_rank: Super Contributor
timestamp: March 15, 2021, 12:14:08 am
content: I think you forgot to enable a trigger source, it worked fine here with these settings:
SHA1 (or SHA256) for SAMC21G : Harmony 3 crypto - Page 1
Forum section: electronics / general

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 15, 2021, 10:46:04 am
content: I need a SHA1 implementation for my SAMC21G18 project which is XC32 in MPLabX with Harmony3...So I added crypto (which requires wolfssl and zlib)... I have defined a couple of things...WC_NO_HARDENNO_WOLFSSL_DIRSINGLE_THREADEDand have made some progress but now get...In file included from ../src/third_party/wolfssl/wolfssl/wolfcrypt/src/port/pic32/crypt_ecc_pukcl.c:48:0:../src/third_party/wolfssl/wolfssl/wolfcrypt/port/pic32/crypt_ecc_pukcl.h:50:36: error: unknown type name 'wc_CryptoInfo'int Crypt_ECC_HandleReq(int devId, wc_CryptoInfo* info, void* ctx);I'm starting to wonder... does the Harmony 3 crypto library work on SAM devices that don't have hardware acceleration for crypto?All I wanted was SHA1 but I thought this would be a good place to start.Thoughts appreciated

author: NivagSwerdna
author_rank: Super Contributor
timestamp: March 15, 2021, 01:58:57 pm
content: I gave up and found a small implementation here...https://github.com/dottedmag/libsha1Credit Dr Brian Gladman