UART interface algorithm debugging technique of porting encryption chip--Communication debugging

Source: Internet
Author: User

Algorithm transplant class encryption chip is Linko core of the company's patented products, the main function is embedded inside the chip Linko Core Security company's Lkcos intelligent operating system, the user can be part of the MCU program key algorithm functions to be ported to the chip to run. The user writes the code in standard C and compiles and downloads it to the smart chip via the Keil C compiler. In the actual operation, the program segment in the smart card chip is run by calling function, and the result is obtained, and as the input data that the user program runs further. So chip into a part of the product, and the algorithm in the chip internal operation, pirates can not crack, fundamentally eliminate the possibility of the program is cracked.
The debugging of the algorithm porting encryption chip contains 2 parts: Communication Debugging and Algorithm debugging. This time first for the communication debugging link frequently asked Questions to parse.
Communication Debugging FAQs
1. Communication Format settings
A frame data format is: A starting bit, 8 data bits, 1 parity bits (not omitted), 2 stop bit, a total of 12 bits.
2. Communication rate
The communication rate of the encryption chip = external clock frequency/divider factor (the default frequency divider is 372). If you change the external clock frequency, the communication rate changes. Our demo circuit uses 3.579Mhz external clock, so the default communication rate =3.579m/372, so the use of 9600bps communication.
3, Reset problem
The encryption chip after power on at least one reset to send instructions, the communication is abnormal after the reset operation, and then re-instruction interaction.
4, clock problems
An external clock must be provided. If the communication is not normal, should first check the clock VPP, frequency is normal, to ensure that the reset and instruction interaction, CLK in a continuous normal supply state. Many customer feedback communication failure is caused by the clock does not start the vibration, late, clock supply discontinuity and so on. Observation can be aided by logic analyzers and oscilloscopes.
5, from the timing of the chip to determine the root cause of the problem
"Before the communication was normal, and now it's not, what's going on?" ”
"I sent instructions, the encryption chip is not to reply, is not the chip problem?" ”
"I received a data error, is not the cryptographic chip running algorithm error?" ”
The content in the above quotation marks is the real information of the user feedback. These problems are described as appearances, and if they cannot be located after initial analysis, they need to be checked from the underlying sequence. Using a logic analyzer or an oscilloscope to capture the MCU and the encryption chip communication timing, and the MCU to send and receive data to do a comparison, so as to determine whether the encryption chip or MCU communication problems caused by the problem.

UART interface algorithm debugging technique of porting encryption chip--Communication debugging

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.