microcontroller

Quantifiable differences between RTOS kernels for small ARM microcontrollers [closed]

╄→гoц情女王★ 提交于 2019-12-04 12:59:10
There are many different RTOS available for microcontrollers. I am specifically looking for RTOS that support the ARM Cortex M processors. Also, I am not interested in closed source solutions. Attempting to compare the relative merits of each RTOS from websites and mailing lists seems pretty difficult as they mostly seem to have equivalent features and do the same thing. The real differences become apparently only after trying to use each RTOS for some tasks. I know this is somewhat subjective question and probably hard to answer - but there must be many people out there who have actually

HAL_RCC_OscConfig takes too long (appx 170 μS), I need it to be <50 μS when waking from STOP

馋奶兔 提交于 2019-12-04 12:50:31
Development for STM32L053R8 on NUCLEO-L053R8 board. We have a system which "wakes" from sleep every 200 μS or so, does a small amount of work then goes back to sleep (Stop mode). Ideally I'd like to wake from STOP in under 50 μS. The HAL_RCC_OscConfig() function takes around 170 μS which renders this effort pointless. From what I can see the majority of time is spent with the PLL Configuration, in particular the while loop ("Wait till PLL is ready") which follows the re-enablement of the PLL (about 98 μS). /* Configure the main PLL clock source, multiplication and division factors. */ __HAL

Resources for learning Verilog [closed]

柔情痞子 提交于 2019-12-04 12:26:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm new to Verilog. Can someone suggest a learning resource, book, video, blog or anything that they had a good personal experience with and helped them learn it faster? If it helps, I have experience programming in several high-level languages, but have no experience programming in C. Thanks 回答1: Learning

What do the __CC_ARM, __ICCARM__, __GNUC__ and __TASKING__ macros mean?

梦想与她 提交于 2019-12-04 11:35:00
问题 I am working on STM32l151rct6a by stm, I have stumbled upon these MACRO definitions __CC_ARM, __ICCARM__, __GNUC__, __TASKING__ Does anyone know what they mean? 回答1: These are different compilers for ARM processors, probably these macros are used to hide compiler-dependent stuff in code that's compilable by several compilers. ICCARM --> IAR (there will also be a macro __IAR_SYSTEMS_ICC__ that is set to the compiler platform version __IMAGECRAFT__ --> Imagecraft C (also see Clifford's comments

USB programming

倾然丶 夕夏残阳落幕 提交于 2019-12-04 07:46:29
问题 I want to program a microcontroller (AVR) to control some leds through USB. It's just out of interest in how to build and program USB devices. There are some AVR microcontrollers that support the USB protocol or I could implement the USB protocol in an another microcontroller myself, but I wonder what to use to write your own drivers on the computer. My level in system programming: total noob (hence the question) So what is the literature you people would advice to get good knowledge of the

C8051f312 microcontroller [closed]

ⅰ亾dé卋堺 提交于 2019-12-04 07:27:17
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm not very good at C language, but I have write a very simple code to a C8051F312 microcontroller. My code doesn't working. Please help me what did I wrong. #include C8051F310.h #include stdio.h sbit LED_16 = P1^7; // green LED: 1 = ON; 0 = OFF void init(void) { // XBRN registers_init XBR0 = 0x00; XBR1 = 0x00;

pronounce a color based on the bits values with the pic 18f4550

好久不见. 提交于 2019-12-04 07:23:00
问题 update 2 I want to make a program that can play sound (that can say red, green and blue) on my pic 18f4550 there is a speaker connected to the picdem, that part works fine, I wrote the following program with microchip version 6.83 with the C compiler. I need to retrieve the bits value of a .wav file, when I say red (this has a bit pattern). My right question, how can a get the bit value of my .wav file. void main (void) { TRISD = 0x00; // PORTD als uitgang TRISB = 0b00110000; // RB4 en RB5

How to Convert pythons Decimal() type into an INT and exponent

北慕城南 提交于 2019-12-04 03:13:46
I would like to use the Decimal() data type in python and convert it to an integer and exponent so I can send that data to a microcontroller/plc with full precision and decimal control. https://docs.python.org/2/library/decimal.html I have got it to work, but it is hackish; does anyone know a better way? If not what path would I take to write a lower level "as_int()" function myself? Example code: from decimal import * d=Decimal('3.14159') t=d.as_tuple() if t[0] == 0: sign=1 else: sign=-1 digits= t[1] theExponent=t[2] theInteger=sign * int(''.join(map(str,digits))) theExponent theInteger For

Call tree for embedded software [closed]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 03:02:30
Closed. This question is off-topic. It is not currently accepting answers. Learn more . Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 months ago . Does anyone know some tools to create a call tree for C application that will run on a microcontroller (Cortex-M3)? It could be generated from source code (not ideal), object code (prefered solution), or at runtime (acceptable). I've looked at gprof, but there's still a lot missing to get it to work on an embedded system. An added bonus would be that the tool also gives the maximum stack depth.

Can I make a function that accepts both ram and rom pointers in Microchip C18?

元气小坏坏 提交于 2019-12-04 02:38:38
When I declare a function that accepts const char* and I pass a string literal, I get a Warning: [2066] type qualifier mismatch in assignment because string literals are rom const char* . It's the same the other way around. Though the PIC is Harvard architecture, the memory is mapped into one contiguous address space, so theoretically it should be possible to support both ram and rom pointers the same way. Probably I have to use rom pointers because they are 24 bit while ram pointers are 16 bit. However, just casting a const char* to a const rom char* does not work. mizo Unfortunately, this is