<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Kinetis Microcontrollers中的主题 Re: Using CAU in K60 Chip [CW]</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290634#M11596</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the "out" for mmcau_sha256_initialize_output is a pointer to 32bit data, so if you want to use sprintf to store the integer pointed by "out" in a string, I think you have to use the following instead: &lt;SPAN style="color: #3d3d3d; font-family: Arial, Helvetica, sans-serif;"&gt;sprintf(hashed, "%d ", (*out));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Jul 2013 04:37:52 GMT</pubDate>
    <dc:creator>Kan_Li</dc:creator>
    <dc:date>2013-07-31T04:37:52Z</dc:date>
    <item>
      <title>Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290632#M11594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;SPAN style="font-family: Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;BR /&gt;I have problem with my project, The point is to send simple text to hardware hashing, and send back the result hash, i made the code &lt;BR /&gt;&lt;SPAN&gt;Here is the code: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://wklej.to/lh0DD"&gt;http://wklej.to/lh0DD&lt;/A&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;And password for open this link : d32f32 &lt;BR /&gt; &lt;BR /&gt;The problem is whatever i sent no matter which letter or number im always getting as result decoded 536806312, and before something like this &lt;BR /&gt;z P?rşőQ[©¸¤JĐä?`ŻčîĄqEs &lt;BR /&gt; &lt;BR /&gt;Even when i changed code to &lt;BR /&gt; &lt;BR /&gt;&amp;nbsp; for(;;) &lt;BR /&gt;&amp;nbsp; { &lt;BR /&gt;&amp;nbsp; Error = AS1_ReceiveBlock(MySerialPtr, InpData, 1U); &lt;BR /&gt;&amp;nbsp; while (!DataReceivedFlg); &lt;BR /&gt;&amp;nbsp; mmcau_sha256_initialize_output(out); &lt;BR /&gt;&amp;nbsp; sprintf(hashed, "%d ", out); &lt;BR /&gt;&amp;nbsp; Error = AS1_SendBlock(MySerialPtr, hashed, sizeof(hashed)); /* &lt;BR /&gt;&amp;nbsp; DataReceivedFlg = FALSE; &lt;BR /&gt;&amp;nbsp; } &lt;BR /&gt; &lt;BR /&gt;Or without sprintf, always was the same result, i really dont know where the problem is, i tried to rewiev few's pdf, change the variables type with no positive result. say nothing of week waiting for library , it should be included in CW btw. Im looking forward for helpful reply. &lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;Regards Alex&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jul 2013 17:07:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290632#M11594</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-07-24T17:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290633#M11595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ANYONE? MAYBE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jul 2013 08:26:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290633#M11595</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-07-30T08:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290634#M11596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the "out" for mmcau_sha256_initialize_output is a pointer to 32bit data, so if you want to use sprintf to store the integer pointed by "out" in a string, I think you have to use the following instead: &lt;SPAN style="color: #3d3d3d; font-family: Arial, Helvetica, sans-serif;"&gt;sprintf(hashed, "%d ", (*out));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 04:37:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290634#M11596</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-07-31T04:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290635#M11597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan,&lt;BR /&gt;Thanks for your reply, but sadly this tip didn't help. I got the same result, but after receive one "result" im getting PE_debughalt, &lt;BR /&gt;Result should be 0 or 1 as it is in mmcau/Cau User Guide, Can you give me correct code to send text and receive hash?&lt;BR /&gt;i begins to doubt that hardware hashing is really presented in this chip.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kindly Regrads Alex&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS. Here is the code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* ###################################################################&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Filename&amp;nbsp;&amp;nbsp;&amp;nbsp; : ProcessorExpert.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Project&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : ProcessorExpert&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Processor&amp;nbsp;&amp;nbsp; : MK60DN512VLQ10&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : Driver 01.01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Compiler&amp;nbsp;&amp;nbsp;&amp;nbsp; : GNU C Compiler&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date/Time&amp;nbsp;&amp;nbsp; : 2013-06-20, 18:36, # CodeGen: 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Abstract&amp;nbsp;&amp;nbsp;&amp;nbsp; :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Main module.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This module contains user's application code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Settings&amp;nbsp;&amp;nbsp;&amp;nbsp; :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Contents&amp;nbsp;&amp;nbsp;&amp;nbsp; :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; No public methods&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** ###################################################################*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** @file ProcessorExpert.c&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** @version 01.01&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** @brief&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Main module.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This module contains user's application code.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp; @addtogroup ProcessorExpert_module ProcessorExpert module documentation&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp; @{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*/&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* MODULE ProcessorExpert */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* Including needed modules to compile this module/procedure */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "Cpu.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "Events.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "AS1.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "PE_Types.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "PE_Error.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "cau_api.h" &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "PE_Const.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#include "IO_Map.h"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;#define FREESCALE_MMCAU&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* User includes (#include below this line is not maintained by Processor Expert) */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;volatile bool DataReceivedFlg = FALSE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;char InpData[10];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;unsigned char hashed[32];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;int num_blks_sha256;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;unsigned int *out; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;int i;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;char padded[192];&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LDD_TError Error;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LDD_TDeviceData *MySerialPtr;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;int main(void)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*lint -restore Enable MISRA rule (6.3) checking. */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /* Write your local variable definition here */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; PE_low_level_init();&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** End of Processor Expert internal initialization.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; MySerialPtr = AS1_Init(NULL);&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error = AS1_ReceiveBlock(MySerialPtr, InpData, 1U);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Start reception of one character */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!DataReceivedFlg);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mmcau_sha256_initialize_output(*out);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sprintf(hashed, " %d ", (*out)); &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Error = AS1_SendBlock(MySerialPtr, hashed, sizeof(hashed)); /* Send block of characters */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataReceivedFlg = FALSE;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** Don't write any code pass this line, or it will be deleted during code generation. ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; #ifdef PEX_RTOS_START&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEX_RTOS_START();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Startup of the selected RTOS. Macro is defined by the RTOS component. */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; #endif&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** End of RTOS startup code.&amp;nbsp; ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; for(;;){}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;void pad_sha256(char *p, char *padded)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int i, nbits, nbytes;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (i=0; ; i++) {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i] = p[i];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (p[i] == 0) break;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nbytes = i;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i++] = 0x80;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; num_blks_sha256 = (((nbytes + 9) % 64) == 0) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;nbsp; ((nbytes + 9) / 64) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :&amp;nbsp; ((nbytes + 9) / 64) + 1;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (; i &amp;lt; (64 * num_blks_sha256) - 4;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i++] = 0;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nbits = nbytes &amp;lt;&amp;lt; 3;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i++] = nbits &amp;gt;&amp;gt; 24;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i++] = nbits &amp;gt;&amp;gt; 16;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i++] = nbits &amp;gt;&amp;gt; 8;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; padded[i] = nbits;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/* END ProcessorExpert */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** @}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** ###################################################################&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This file was created by Processor Expert 10.2 [05.06]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for the Freescale Kinetis series of microcontrollers.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;**&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;** ###################################################################&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*/&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jul 2013 10:31:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290635#M11597</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-07-31T10:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290636#M11598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The MMCAU is a coprocessor that is connected to the processor's Private Peripheral Bus (PPB).It supports acceleration of the DES, 3DES, AES, MD5, SHA-1 and SHA-256 algorithms. and the proper usage for &lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;mmcau_sha256_initialize_output&lt;/STRONG&gt;() is like below:&lt;/P&gt;&lt;P&gt;unsigned int out[8]; // encrypted output&lt;/P&gt;&lt;P&gt;mmcau_sha256_initialize_output (out);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please kindly refer to the attached sample code for more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, It looks like you use the UART to output the &lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;hashed&lt;/STRONG&gt; data, so I think maybe you can use printf() to do that, it can be achieved by adding PE's component "ConsoleIO" instead of "Serial_LDD". Please kindly refer to the following for details.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40187i95CFEACF559EDC4E/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.PNG.png" alt="3.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 06:16:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290636#M11598</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-01T06:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290637#M11599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kan &lt;BR /&gt;thanks for reply, i tried to add ConsoleIO but there is nothing happend after prinft(out);&amp;nbsp; i got no result in terra term,&lt;BR /&gt;When i changed variable, and send by the Serial_LDD , i got " 1779033703 " Does it mean that conversion &lt;SPAN style="font-family: Arial,Helvetica,sans-serif; font-size: 10pt;"&gt; sprintf(hashed, "%d ", out);&amp;nbsp; is wrong? Any idea to stay on Serial_ldd and make this workable?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;Regards.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 13:26:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290637#M11599</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-01T13:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290638#M11600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think maybe you didn't use printf() correctly, the following is my code for your case,&lt;/P&gt;&lt;P&gt;&amp;nbsp; mmcau_sha256_initialize_output(out);&lt;/P&gt;&lt;P&gt;&amp;nbsp; for(i=0;i&amp;lt;8;i++)&lt;/P&gt;&lt;P&gt;&amp;nbsp; printf("out[%d]=%d\n\r",i,out[i]);&lt;/P&gt;&lt;P&gt;and the output is like below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="4.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40203iA4754E9EA2FB533F/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.PNG.png" alt="4.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Please kindly refer to the attached project for more details. The project is based on TWR-K60N512.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 02:54:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290638#M11600</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-02T02:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290639#M11601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan, &lt;BR /&gt;Im a little bit confused right now, i dont understund why the results aren't 0 or 1, i though that mmcau_sha256_initialize_output (out); alocates the output to Out and returns the value 0 or -1 does HW support exists and then its needed use mmcau_sha256_hash function to calculate checksum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards &lt;BR /&gt;Thanks for your &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;patience and &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;helpfulness.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 22:39:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290639#M11601</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-02T22:39:31Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290640#M11602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;mmcau_sha256_initialize_output() is used to initialize the first 8 hash values which are defined by the sha256 algorithm , it is not generated by HW, they are fixed values for each start of sha256 calculation, please kindly refer to the following for details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40230iE3CB93138931A03F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG.png" alt="1.PNG.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;You may also refer&amp;nbsp; to &lt;A href="http://en.wikipedia.org/wiki/SHA-2"&gt;http://en.wikipedia.org/wiki/SHA-2&lt;/A&gt; for more details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Hope that helps,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;B.R&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 10pt; line-height: 1.5em;"&gt;Kan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Aug 2013 00:24:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290640#M11602</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-03T00:24:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290641#M11603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;BR /&gt;But take a look what CAUAPIUG.pdf says &lt;span class="lia-inline-image-display-wrapper" image-alt="Untitled.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40235i3BFDE2C760969BC0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.jpg" alt="Untitled.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;Anyway thanks for clarify using this functions.&lt;BR /&gt;Can you adapt or modify my code that may send whatever text to hash, by UART(serial_ldd) and next receive computed checksum back in TerraTerm by UART.&lt;BR /&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;I would be very&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;grateful, &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;I tried&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for a long time&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;run this project but allways with &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;failure.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="hps"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: Arial,Helvetica,sans-serif; font-size: 10pt;"&gt;&lt;A class="jive-link-external-small" href="http://wklej.to/lh0DD"&gt;http://wklej.to/lh0DD&lt;/A&gt; &lt;BR /&gt;And password for open this link : d32f32&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Aug 2013 16:36:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290641#M11603</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-03T16:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290642#M11604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please kindly refer to the attached project for details, it is based on TWR-K60N512, and you will have the same output as I provided before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 03:36:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290642#M11604</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-05T03:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290643#M11605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, it works fine, but this isn't end, becouse im trying to for ex. send "abcd" and receive from k60 by uart "88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589"&amp;nbsp; , its possible? i tried few ways, but with failure.&lt;BR /&gt;Im really gratefull for your patience and help. &lt;BR /&gt;BR&lt;BR /&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 08:03:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290643#M11605</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-05T08:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290644#M11606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to implement, please use the following code instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /* Write your code here */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; /* For example: for(;;) { } */&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; AS1_Handle = AS1_Init(NULL);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; mmcau_sha256_initialize_output(out);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; AS1_ReceiveBlock(AS1_Handle,buffer,4);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; while(AS1_GetReceivedDataNum(AS1_Handle)&amp;lt;4);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; buffer[4] = '\0';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; if(strcmp(buffer,"abcd")==0)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; {&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; sprintf(buffer,"%x%x%x%x%x%x\n\r",out[0],out[1],out[2],out[3],out[4],out[5],out[6],out[7]);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; AS1_SendBlock(AS1_Handle, buffer, strlen(buffer));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp; while(!AS1_GetTxCompleteStatus(AS1_Handle));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The output is "&lt;STRONG&gt;6a09e667bb67ae853c6ef372a54ff53a510e527f9b05688c&lt;/STRONG&gt;" when you input "&lt;STRONG&gt;abcd&lt;/STRONG&gt;" via UART.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 08:35:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290644#M11606</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-05T08:35:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290645#M11607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kan&lt;BR /&gt;Im sorry but i mean that for example, i need to send abcd and get hashed value for sha256 abcd its=" &lt;STRONG&gt;6a09e667bb67ae853c6ef372a54ff53a510e527f9b05688c" &lt;/STRONG&gt;with&amp;nbsp; mmcau_sha256_hash&amp;nbsp; ,or send whatever text to hash and get hash of it from mmcau, &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;and so&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;on and so forth for next hashes.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 23:09:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290645#M11607</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-05T23:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290646#M11608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the misunderstanding!! Please refer to the attached project for your requirement. You may input any string ended by pressing Enter, and the hashed value will be output via UART. BTW, &lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;6a09e667bb67ae853c6ef372a54ff53a510e527f9b05688c&lt;/STRONG&gt; you mentioned is not the hashed value for "abcd", it is the first 6 initial hashed value for sha256. You may refer to my previous post for details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 03:03:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290646#M11608</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-06T03:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290647#M11609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kan, Thanks for upload this project. Now i thereabout know how it works, but sadly when i imported your project, and tried to compile i got, &lt;BR /&gt;Undefined refernce to 'mmcau_sha256_hash and mmcau_sha256_initialize_output, i tried to readd cau_api.h with no success, but i think the problem is in lib_mmcau.a but i can't remeber how i added this in my earlier project. So i opened my old project and replaced procesor expert code with your code, and tried to compile but i got few error's&lt;span class="lia-inline-image-display-wrapper" image-alt="1.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40215iE83352A5346AA9EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.JPG.jpg" alt="1.JPG.jpg" /&gt;&lt;/span&gt;T&lt;BR /&gt;Tried to fix it, but when finally compiled and started debugging i got an PE_debughalt; sorry if these problems stem from my lack of knowledge in the fundamentals of using code warrior.i &lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;really&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;appreciate your&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;patience. Regards :smileyhappy:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Aug 2013 11:58:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290647#M11609</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-06T11:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290648#M11610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you referring to the FLASH configuration of the example? If you are using the SRAM configuration you will have issue as I didn't set it up properly. Please refer to the following for details.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="4.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40257i096A7DAADF25C06D/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.PNG.png" alt="4.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also asked my colleague to open it in his laptop and compile, the result is good as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please kindly let me know if you have any issue.&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 06:18:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290648#M11610</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-07T06:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290649#M11611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kan&lt;BR /&gt;Sadly im getting pe_debug halt, i tried on PEE 100mhz and FEI 95mhz&lt;span class="lia-inline-image-display-wrapper" image-alt="sdas.JPG.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40268i32DDC9A9ADBC25A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="sdas.JPG.jpg" alt="sdas.JPG.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Aug 2013 21:40:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290649#M11611</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-07T21:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290650#M11612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alex,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the example running on TWR-K60N512? If you run it on a custom board, you will have issue like that as the mismatch of configuration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 01:06:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290650#M11612</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-08-08T01:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using CAU in K60 Chip [CW]</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290651#M11613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Kan&lt;BR /&gt;I have ma own board(FEI mode,withour oscilator) but i tried too on Mcu mini board(PEE on oscilator 50mhz,from china), but whats difference? The k60 is the same as in Tower module, any idea to fix this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 12:03:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Using-CAU-in-K60-Chip-CW/m-p/290651#M11613</guid>
      <dc:creator>alexpaul</dc:creator>
      <dc:date>2013-08-08T12:03:39Z</dc:date>
    </item>
  </channel>
</rss>

