embedded

Looking for a comparison of different scheduling algorithms for a Finite State Machine

此生再无相见时 提交于 2019-12-12 07:22:57
问题 Are there any good resources (books, websites) that give very good comparison of different scheduling algorithms for a Finite State Machine (FSM) in an embedded system without an OS? I am designing a simple embedded web server without an OS. I would like to know what are the various methods used to schedule the processing of the different events that occur in the system. For example,if two events arrived at the same time how are the events prioritized? If I assign different priorities to

Sorting 1 million 8-digit numbers in 1 MB of RAM

断了今生、忘了曾经 提交于 2019-12-12 07:09:52
问题 I have a computer with 1 MB of RAM and no other local storage. I must use it to accept 1 million 8-digit decimal numbers over a TCP connection, sort them, and then send the sorted list out over another TCP connection. The list of numbers may contain duplicates, which I must not discard. The code will be placed in ROM, so I need not subtract the size of my code from the 1 MB. I already have code to drive the Ethernet port and handle TCP/IP connections, and it requires 2 KB for its state data,

Converting floats and integers to char*

左心房为你撑大大i 提交于 2019-12-12 07:05:08
问题 I'm new to C and was kind of thrust into this world of embedded processing with C. I need to convert to char* and output integers and floating point numbers (only 0.01 resolution) to an LCD screen with an 8 bit interface. I've been reading through some of the posts and I see all these great ideas for converting int and float to char* but I'm not exactly sure what's going on in them. Can someone provide a method for my two queries and a little explanation? 回答1: It actually depends upon the

arm cortex m3 display

一曲冷凌霜 提交于 2019-12-12 06:49:28
问题 hi i am working on arm controller lm3s8962 i m not able to understand the code below as per my understanding it is checking if the character is from the array or not, which he created using the ascii characters{i.e in the while loop : while(*pcStr != 0) }, i am not able to get what he is doing in the code after the line "Build and display the character buffer" plz can anyone explain this void RIT128x96x4StringDraw(const char *pcStr, unsigned long ulX, unsigned long ulY, unsigned char ucLevel)

Confusion in file Verification with CRC16 in C

喜夏-厌秋 提交于 2019-12-12 06:38:29
问题 Here i want to know the how can i implement calculate CRC16 for Any type of file, Here i have idea about CRC16 and its code logic. here i made one function which take file path as a input and find out CRC value of this. here i pass file name in this function and this functions calculates CRC value of this file. but i want to calculate all types of files like .tar,.tar.gz,.txt,.bin,.scr etc . so here i open this all files and "rb" mode and take one by one character and find out CRC value its

How to code ARM interrupt functions in C

泄露秘密 提交于 2019-12-12 06:08:49
问题 I am using arm-none-eabi-gcc toolchain, v 4.8.2, on LinuxMint 17.2 64b. I am, at hobbyist level, trying to play with a TM4C123G board and its usual features (coding various blinkies, uart things...) but always trying to remain as close to the metal as possible without using other libraries (eg CMSIS...) whenever possible. Also no IDE (CCS, Keil...), just Linux terminal windows, the board and I... All that mostly for education purpose. The issue : I am stuck trying to implement the usual

Redirect VxWorks Serial Input

醉酒当歌 提交于 2019-12-12 05:06:51
问题 I am trying to redirect all serial data to a process in VxWorks. Using the following code fd = open("/tyCo/0", O_RDWR,0); ioctl(fd, FIOSETOPTIONS, OPT_TERMINAL & ~OPT_7_BIT); read(fd, line, 100); gives the correct input, except the first character entered is not populated, but is printed to the terminal. So if I enter "Hello", "H" is printed out and line="ello". If I don't enter anything and hit the return key, I get a prompt from the VxWorks Shell. I think that the VxWorks Shell is

Task Scheduling in Embedded web server with out OS

戏子无情 提交于 2019-12-12 05:00:27
问题 I am doing project on the Embedded web server. The Embedded server is without the Operating system. At this conditions how the multiple task will be scheduled in such system? are the cyclic-executive and super-loop same things? 回答1: cyclic-executive with or without interrupts 来源: https://stackoverflow.com/questions/11904288/task-scheduling-in-embedded-web-server-with-out-os

STM32CubeF7 BSP LCD attempt

夙愿已清 提交于 2019-12-12 04:57:50
问题 I'm trying to display a string on stm32f769i-disco's LED with BSP libraries from STM32CubeF7. However, nothing happens. Here is the code: #include "stm32f7xx_hal.h" #include "stm32f769i_discovery.h" #include "stm32f769i_discovery_lcd.h" #include "stm32f7xx.h" #include <stdio.h> char str[] = "Hello from BSP LCD demo!"; void LCDInit() { // Initialize the LCD using the BSP_LCD_Init() function. BSP_LCD_Init(); // Select the LCD layer to be used using the BSP_LCD_SelectLayer() function. //BSP_LCD

State machine program design in FreeRTOS - vTaskStartScheduler in a switch statement

不羁的心 提交于 2019-12-12 04:44:50
问题 I have a program design question in FreeRTOS: I have a state machine with 4 states, and 6 tasks. In each state, different tasks must be executed, excepting Task1, which is always active: State 1: Task1, Task2, Task3 State 2: Task1, Task2, Task3, Task4 State 3: Task1, Task5 State 4: Task1, Task6 Task1, Task3, Task4, Task5 and Task6 are periodic, and each one reads a different sensor. Task2 is aperiodic, it sends a GPRS alarm only if a threshold is reached. The switching between the states is