2266820_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2266820_en-US

2266820_en-US

CRC Evaluation using direct memory addressing

Hello all.

I'm working with S32K358 MCU, MBD Toolbox v1.6.0 and Matlab R2024a.

I know that Crc module isn't supported by the toolbox, so I configured the .mex file of the project in order to generate the RTD configuration suitable for my application, including Crc module, and then I wrote a Matlab function in order to manually call, as custom code, the "Crc_SetChannelCalculate" function.

This works fine and I can evaluate correctlty the CRC over a data streaming like an array.

Now what I would like to do is to evaluate the CRC on an area of memory, using directly the memory address as data input. If I write the code "manually" using S32DS IDE (outside Matlab), the code looks like this:

//--- code start

uint32 CrcResult;

uint8 *data;

data = (uint8 *)0x40A1F0; //arbitrary address chosen for starting calculation

CrcResult = Crc_SetChannelCalculate(CRC_LOGIC_CHANNEL_2, data, 16, 0, TRUE);

//in this way I calculate the CRC of 16 byte, with starting value = 0, read directly in flash starting from address 0x40A1F0

//---

Of course, before this, I initialized the logic channel CRC_LOGIC_CHANNEL_2 with the properties suitable for my application.

This code works fine but I'm not able to "translate" it on Matlab, because I didn't find a suitable way for make a direct memory addressing (and, if I'm not wrong, Matlab doesn't support this possibility).

I would please ask you if someone has an idea on how to face this matter.

Thansk in advance for your help and support.


Daniel



タグ(1)
評価なし
バージョン履歴
最終更新日:
‎12-20-2025 04:30 AM
更新者: