An example of importing Embedded Coder code into the mbed IDE. Currently doesn't connect IO to PWM, ADC, and Encoder, instead provides random inputs and measures execution time.
Dependencies: mbed-dsp mbed Nucleo_pmsmfoc
html/html/rtwdemo_pmsmfoc_interface.html
- Committer:
- paulcox
- Date:
- 2014-11-25
- Revision:
- 2:bbc155b0b886
File content as of revision 2:bbc155b0b886:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><link rel="stylesheet" type="text/css" href="rtwreport.css" /><script language="JavaScript" type="text/javascript">function rtwTableShrink(o) {var t = o.nextSibling;if (t.nodeType != 1) {t = t.nextSibling;}if (t.style.display == "none") {t.style.display = "";o.innerHTML = "[-]"} else {t.style.display = "none";o.innerHTML = "[+] ... "}}</script><script language="JavaScript" type="text/javascript" src="rtwreport_utils.js"></script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title> Code Interface Report for rtwdemo_pmsmfoc </title> </head> <body ONLOAD="try {if (top) {if (top.rtwPageOnLoad) top.rtwPageOnLoad('rtwIdCodeInterface'); else local_onload();}} catch(err) {};"> <h1> Code Interface Report for rtwdemo_pmsmfoc </h1> <h3> Table of Contents </h3> <ul> <li> <a href="#sec_Entry_Point_Functions"> Entry Point Functions </a> </li> <li> <a href="#sec_Inports"> Inports </a> </li> <li> <a href="#sec_Outports"> Outports </a> </li> <li> <a href="#sec_Interface_Parameters"> Interface Parameters </a> </li> <li> <a href="#sec_Data_Stores"> Data Stores </a> </li> </ul> <h3> <a name="sec_Entry_Point_Functions"> Entry Point Functions </a> </h3> <p> Function: <a href="rtwdemo_pmsmfoc_c.html#fcn_Controller_Init">Controller_Init</a> </p> <table width="100%" class="AltRow" cellspacing="0"> <tr class="even"> <td width="25%" align="left" valign="top"> Prototype </td> <td width="75%" align="left" valign="top"> <b> void Controller_Init(void) </b> </td> </tr> <tr class="odd"> <td width="25%" align="left" valign="top"> Description </td> <td width="75%" align="left" valign="top"> Initialization entry point of generated code </td> </tr> <tr class="even"> <td width="25%" align="left" valign="top"> Timing </td> <td width="75%" align="left" valign="top"> Must be called exactly once </td> </tr> <tr class="odd"> <td width="25%" align="left" valign="top"> Arguments </td> <td width="75%" align="left" valign="top"> None </td> </tr> <tr class="even"> <td width="25%" align="left" valign="top"> Return value </td> <td width="75%" align="left" valign="top"> None </td> </tr> <tr class="odd"> <td width="25%" align="left" valign="top"> Header file </td> <td width="75%" align="left" valign="top"> <a href="rtwdemo_pmsmfoc_h.html">rtwdemo_pmsmfoc.h</a> </td> </tr> </table> <p> Function: <a href="rtwdemo_pmsmfoc_c.html#fcn_Controller">Controller</a> </p> <table width="100%" class="AltRow" cellspacing="0"> <tr class="even"> <td width="25%" align="left" valign="top"> Prototype </td> <td width="75%" align="left" valign="top"> <b> EnumErrorType Controller(uint16_T motor_on, EnumCommandType command_type, real32_T current_request, SENSORS_STRUCT *sensors, uint16_T pwm_compare[3]) </b> </td> </tr> <tr class="odd"> <td width="25%" align="left" valign="top"> Description </td> <td width="75%" align="left" valign="top"> Output entry point of generated code </td> </tr> <tr class="even"> <td width="25%" align="left" valign="top"> Timing </td> <td width="75%" align="left" valign="top"> Must be called periodically, every 4e-05 seconds </td> </tr> <tr class="odd"> <td width="25%" align="left" valign="top"> Arguments </td> <td width="75%" align="left" valign="top"> <span title="Click to shrink or expand table" onclick="rtwTableShrink(this)">[-]</span><table class="AltRow FirstColumn" cellspacing="0"> <tr class="heading"> <th align="left" valign="top"> <b> # </b> </th> <th align="left" valign="top"> <b> Name </b> </th> <th align="left" valign="top"> <b> Data Type </b> </th> <th align="left" valign="top"> <b> Description </b> </th> </tr> <tr class="even"> <td align="right" valign="top"> 1 </td> <td align="left" valign="top"> motor_on </td> <td align="left" valign="top"> uint16_T </td> <td align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:2783')" name="code2model" class="code2model"><Root>/motor_on</a> </td> </tr> <tr class="odd"> <td align="right" valign="top"> 2 </td> <td align="left" valign="top"> command_type </td> <td align="left" valign="top"> EnumCommandType </td> <td align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:4806')" name="code2model" class="code2model"><Root>/command_type</a> </td> </tr> <tr class="even"> <td align="right" valign="top"> 3 </td> <td align="left" valign="top"> current_request </td> <td align="left" valign="top"> real32_T </td> <td align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:4807')" name="code2model" class="code2model"><Root>/command_value</a> </td> </tr> <tr class="odd"> <td align="right" valign="top"> 4 </td> <td align="left" valign="top"> sensors </td> <td align="left" valign="top"> SENSORS_STRUCT * </td> <td align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:198')" name="code2model" class="code2model"><Root>/sensors</a> </td> </tr> <tr class="even"> <td align="right" valign="top"> 5 </td> <td align="left" valign="top"> pwm_compare </td> <td align="left" valign="top"> uint16_T </td> <td align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:4811')" name="code2model" class="code2model"><Root>/pwm_compare</a> </td> </tr> </table> </td> </tr> <tr class="even"> <td width="25%" align="left" valign="top"> Return value </td> <td width="75%" align="left" valign="top"> <table class="AltRow FirstColumn" cellspacing="0"> <tr class="heading"> <th align="left" valign="top"> <b> Data Type </b> </th> <th align="left" valign="top"> <b> Description </b> </th> </tr> <tr class="even"> <td align="left" valign="top"> EnumErrorType </td> <td align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:5907')" name="code2model" class="code2model"><Root>/error</a> </td> </tr> </table> </td> </tr> <tr class="odd"> <td width="25%" align="left" valign="top"> Header file </td> <td width="75%" align="left" valign="top"> <a href="rtwdemo_pmsmfoc_h.html">rtwdemo_pmsmfoc.h</a> </td> </tr> </table> <h3> <a name="sec_Inports"> Inports </a> </h3> <span title="Click to shrink or expand table" onclick="rtwTableShrink(this)">[-]</span><table width="100%" class="AltRow FirstColumn" cellspacing="0"> <tr class="heading"> <th width="40%" align="left" valign="top"> <b> Block Name </b> </th> <th width="25%" align="left" valign="top"> <b> Code Identifier </b> </th> <th width="25%" align="left" valign="top"> <b> Data Type </b> </th> <th width="10%" align="right" valign="top"> <b> Dimension </b> </th> </tr> <tr class="even"> <td width="40%" align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:2783')" name="code2model" class="code2model"><Root>/motor_on</a> </td> <td width="25%" align="left" valign="top"> <i> Defined externally </i> </td> <td width="25%" align="left" valign="top"> uint16_T </td> <td width="10%" align="right" valign="top"> 1 </td> </tr> <tr class="odd"> <td width="40%" align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:4806')" name="code2model" class="code2model"><Root>/command_type</a> </td> <td width="25%" align="left" valign="top"> <i> Defined externally </i> </td> <td width="25%" align="left" valign="top"> EnumCommandType </td> <td width="10%" align="right" valign="top"> 1 </td> </tr> <tr class="even"> <td width="40%" align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:4807')" name="code2model" class="code2model"><Root>/command_value</a> </td> <td width="25%" align="left" valign="top"> <i> Defined externally </i> </td> <td width="25%" align="left" valign="top"> real32_T </td> <td width="10%" align="right" valign="top"> 1 </td> </tr> <tr class="odd"> <td width="40%" align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:198')" name="code2model" class="code2model"><Root>/sensors</a> </td> <td width="25%" align="left" valign="top"> <i> Defined externally </i> </td> <td width="25%" align="left" valign="top"> SENSORS_STRUCT </td> <td width="10%" align="right" valign="top"> 1 </td> </tr> </table> <h3> <a name="sec_Outports"> Outports </a> </h3> <table width="100%" class="AltRow FirstColumn" cellspacing="0"> <tr class="heading"> <th width="40%" align="left" valign="top"> <b> Block Name </b> </th> <th width="25%" align="left" valign="top"> <b> Code Identifier </b> </th> <th width="25%" align="left" valign="top"> <b> Data Type </b> </th> <th width="10%" align="right" valign="top"> <b> Dimension </b> </th> </tr> <tr class="even"> <td width="40%" align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:4811')" name="code2model" class="code2model"><Root>/pwm_compare</a> </td> <td width="25%" align="left" valign="top"> <i> Defined externally </i> </td> <td width="25%" align="left" valign="top"> uint16_T </td> <td width="10%" align="right" valign="top"> [3] </td> </tr> <tr class="odd"> <td width="40%" align="left" valign="top"> <a href="matlab:coder.internal.code2model('rtwdemo_pmsmfoc:5907')" name="code2model" class="code2model"><Root>/error</a> </td> <td width="25%" align="left" valign="top"> <i> Defined externally </i> </td> <td width="25%" align="left" valign="top"> EnumErrorType </td> <td width="10%" align="right" valign="top"> 1 </td> </tr> </table> <h3> <a name="sec_Interface_Parameters"> Interface Parameters </a> </h3> <table width="100%" class="AltRow FirstColumn" cellspacing="0"> <tr class="heading"> <th width="40%" align="left" valign="top"> <b> Parameter Source </b> </th> <th width="25%" align="left" valign="top"> <b> Code Identifier </b> </th> <th width="25%" align="left" valign="top"> <b> Data Type </b> </th> <th width="10%" align="right" valign="top"> <b> Dimension </b> </th> </tr> <tr class="even"> <td width="40%" align="left" valign="top"> ctrlParams </td> <td width="25%" align="left" valign="top"> ctrlParams </td> <td width="25%" align="left" valign="top"> CTRLPARAMS_STRUCT </td> <td width="10%" align="right" valign="top"> 1 </td> </tr> </table> <h3> <a name="sec_Data_Stores"> Data Stores </a> </h3> <p> No data stores in the model; note that this report lists only data stores with non-auto storage class and global data stores </p> </body> </html>