<?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>topic Re: use CSEC_DRV_GenerateMACAddrMode to generate CMAC but occurs reset and rigister RCM_SRS[LOCKUP] in S32K</title>
    <link>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1531146#M18072</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;there's a note in the reference manual:&lt;/P&gt;
&lt;P&gt;"In addition, program flash reads are not allowed when CSEc command CMD_VERIFY_MAC (pointer method) or CMD_GENERATE_MAC (pointer method) is running."&lt;/P&gt;
&lt;P&gt;The driver executes the command from RAM memory but there's probably an interrupt which accessed the flash. So, try to disable the interrupts and I guess it will work as expected.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To make it bulletproff, the CMAC should be stored in flash area which is checked by secure boot feature. So, if the application is updated, also BOOT_MAC needs to be updated after programming new CMAC.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 13:55:49 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2022-09-30T13:55:49Z</dc:date>
    <item>
      <title>use CSEC_DRV_GenerateMACAddrMode to generate CMAC but occurs reset and rigister RCM_SRS[LOCKUP] = 1</title>
      <link>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1529882#M18043</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. We have encountered a difficult problem, when I use&amp;nbsp;CSEC_DRV_GenerateMACAddrMode(the size is 64k bytes and start address is 0x10000.) to calculate CMAC value in bootloader,the board will reset and rigister RCM_SRS[LOCKUP] = 1, I want to know why it occurs and how to solve this problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN&gt;const uint8_t *flash_pointer = (uint8_t *)(0x10000);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN&gt;uint32_t aplLenth = 64 * 1024 * 8;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN&gt;uint8_t cmacValue[16];&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333333"&gt;&lt;SPAN&gt;stat = CSEC_DRV_GenerateMACAddrMode(CSEC_KEY_11, flash_pointer, aplLenth, cmacValue);&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. if I try to use chain of trust to verify apl,&amp;nbsp;Where should CMAC be stored? if this is possible to Use CSEC_DRV_VerifyMACAddrMode to verify? because of the APL image occupies 2 read partitions, Whether or not we should generate two CMAC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;board: S32K146&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;partition: bootloader:0x00000-0x10000 ,apl:0x10000-0xFFFFF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;csec repository: SDK_S32K1xx_15&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 01:06:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1529882#M18043</guid>
      <dc:creator>baichuan</dc:creator>
      <dc:date>2022-09-29T01:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: use CSEC_DRV_GenerateMACAddrMode to generate CMAC but occurs reset and rigister RCM_SRS[LOCKUP]</title>
      <link>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1531146#M18072</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;there's a note in the reference manual:&lt;/P&gt;
&lt;P&gt;"In addition, program flash reads are not allowed when CSEc command CMD_VERIFY_MAC (pointer method) or CMD_GENERATE_MAC (pointer method) is running."&lt;/P&gt;
&lt;P&gt;The driver executes the command from RAM memory but there's probably an interrupt which accessed the flash. So, try to disable the interrupts and I guess it will work as expected.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;To make it bulletproff, the CMAC should be stored in flash area which is checked by secure boot feature. So, if the application is updated, also BOOT_MAC needs to be updated after programming new CMAC.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 13:55:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1531146#M18072</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2022-09-30T13:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: use CSEC_DRV_GenerateMACAddrMode to generate CMAC but occurs reset and rigister RCM_SRS[LOCKUP]</title>
      <link>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1531341#M18077</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you for your patient answer, it is helpful to me&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 01 Oct 2022 02:16:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32K/use-CSEC-DRV-GenerateMACAddrMode-to-generate-CMAC-but-occurs/m-p/1531341#M18077</guid>
      <dc:creator>baichuan</dc:creator>
      <dc:date>2022-10-01T02:16:33Z</dc:date>
    </item>
  </channel>
</rss>

