STM32 Project (iii)--General Lin Controller

Source: Internet
Author: User

stm32--Universal Lin Controller


Purpose: The sharing of technology is limited, the spirit of sharing is unlimited.


Demand:

Lin Motor controller: AFS (DHL+AFL)--Corner assist lighting system

DHL: Upper limit, under limit, 0-bit, motor aging cycle;

AFL: Left limit, right limit, 0-bit, motor aging cycle;

All parameters can be configured: upper limit, lower limit, 0-bit, left limit, right limit, motor cycle limit, motor cycle limit, motor cycle times, motor cycle wait time;

Save at least 30 product configuration, configuration interface needs to have add, read, find, delete function.


Solution: STM32 + Lin + serial (using NXP's serial screen, Tja series Lin Chip)

STM32 Lin interface as the primary node, the motor as the slave node.

System design: RTX multi-task design, serial processing tasks, display processing tasks, Lin send tasks;

(1), Serial Processing task: Click on the serial screen will get to click on the coordinate values, serial interrupt to accept the data into the queue, the task of the team to resolve the coordinates, to determine whether the upper and lower limits, etc.

(2), Lin Send task: 20ms cycle frame, timer set event, task waiting for event, and send Lin period frame; (periodic frames are specific product protocols)

(3), display tasks:

Configuration Interface--add configuration, input all parameters and save to MCU internal flash, read configuration, read parameters from Flash to specify location of interface, find configuration, display the matching parameters from Flash to interface by device model, delete configuration.

Logic function-Initialize, configure the motor 0-bit, upper and lower limits, modify Lin periodic frame parameters, up/down Left/right/limit, 0 position, motor go to the specified position; Motor cycle, motor aging experiment, keep up and down, cycle frame, time configurable, the number can be configured.





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.