[{"data":1,"prerenderedAt":1059},["ShallowReactive",2],{"docs-nav-docs_en":3,"docs-page-\u002Fen\u002Fdevice-sdk\u002Fcan":367,"docs-surround-\u002Fen\u002Fdevice-sdk\u002Fcan":1056},[4],{"title":5,"path":6,"stem":7,"children":8},"En","\u002Fen","en",[9,13,41,58,76,103,157,171,190,211,238,283,303],{"title":10,"path":6,"stem":11,"navTitle":12},"QInsight Documentation","en\u002Findex","Overview",{"title":14,"navTitle":15,"path":16,"stem":17,"children":18,"page":40},"Getting Started",null,"\u002Fen\u002Fgetting-started","en\u002F01.getting-started",[19,23,27,31,36],{"title":20,"path":21,"stem":22,"navTitle":20},"What is QENEX Suite","\u002Fen\u002Fgetting-started\u002Fwhat-is-qenex-suite","en\u002F01.getting-started\u002F1.what-is-qenex-suite",{"title":24,"path":25,"stem":26,"navTitle":24},"What is QInsight","\u002Fen\u002Fgetting-started\u002Fwhat-is-qinsight","en\u002F01.getting-started\u002F2.what-is-qinsight",{"title":28,"path":29,"stem":30,"navTitle":28},"Installation","\u002Fen\u002Fgetting-started\u002Finstallation","en\u002F01.getting-started\u002F3.installation",{"title":32,"path":33,"stem":34,"navTitle":35},"The QInsight user interface","\u002Fen\u002Fgetting-started\u002Fthe-qinsight-interface","en\u002F01.getting-started\u002F4.the-qinsight-interface","User interface",{"title":37,"path":38,"stem":39,"navTitle":37},"Licensing","\u002Fen\u002Fgetting-started\u002Flicensing","en\u002F01.getting-started\u002F5.licensing",false,{"title":42,"navTitle":15,"path":43,"stem":44,"children":45,"page":40},"First Project","\u002Fen\u002Ffirst-project","en\u002F02.first-project",[46,50,54],{"title":47,"path":48,"stem":49,"navTitle":47},"Create a project","\u002Fen\u002Ffirst-project\u002Fcreate-a-project","en\u002F02.first-project\u002F1.create-a-project",{"title":51,"path":52,"stem":53,"navTitle":51},"Project structure","\u002Fen\u002Ffirst-project\u002Fproject-structure","en\u002F02.first-project\u002F2.project-structure",{"title":55,"path":56,"stem":57,"navTitle":55},"Project password","\u002Fen\u002Ffirst-project\u002Fproject-password","en\u002F02.first-project\u002F3.project-password",{"title":59,"navTitle":15,"path":60,"stem":61,"children":62,"page":40},"Connecting a Device","\u002Fen\u002Fconnecting-a-device","en\u002F03.connecting-a-device",[63,67,71],{"title":64,"path":65,"stem":66,"navTitle":64},"Add a driver","\u002Fen\u002Fconnecting-a-device\u002Fadd-a-driver","en\u002F03.connecting-a-device\u002F1.add-a-driver",{"title":68,"path":69,"stem":70,"navTitle":68},"Add a protocol","\u002Fen\u002Fconnecting-a-device\u002Fadd-a-protocol","en\u002F03.connecting-a-device\u002F2.add-a-protocol",{"title":72,"path":73,"stem":74,"navTitle":75},"Link a driver and a protocol","\u002Fen\u002Fconnecting-a-device\u002Flink-driver-and-protocol","en\u002F03.connecting-a-device\u002F3.link-driver-and-protocol","Linking",{"title":77,"navTitle":15,"path":78,"stem":79,"children":80,"page":40},"Variables","\u002Fen\u002Fvariables","en\u002F04.variables",[81,85,90,94,99],{"title":82,"path":83,"stem":84,"navTitle":82},"What is a variable","\u002Fen\u002Fvariables\u002Fwhat-is-a-variable","en\u002F04.variables\u002F1.what-is-a-variable",{"title":86,"path":87,"stem":88,"navTitle":89},"Conversion and presentation","\u002Fen\u002Fvariables\u002Fconversion-and-presentation","en\u002F04.variables\u002F2.conversion-and-presentation","Conversion & presentation",{"title":91,"path":92,"stem":93,"navTitle":91},"Add a variable","\u002Fen\u002Fvariables\u002Fadd-a-variable","en\u002F04.variables\u002F3.add-a-variable",{"title":95,"path":96,"stem":97,"navTitle":98},"Matrix variable (array, curve, map)","\u002Fen\u002Fvariables\u002Fmatrix-variable","en\u002F04.variables\u002F4.matrix-variable","Matrix variable",{"title":100,"path":101,"stem":102,"navTitle":100},"Events","\u002Fen\u002Fvariables\u002Fevents","en\u002F04.variables\u002F5.events",{"title":104,"navTitle":15,"path":105,"stem":106,"children":107,"page":40},"Visualization","\u002Fen\u002Fvisualization","en\u002F05.visualization",[108,113,118,122,127,132,137,142,147,152],{"title":109,"path":110,"stem":111,"navTitle":112},"Create a workspace","\u002Fen\u002Fvisualization\u002Fcreate-a-workspace","en\u002F05.visualization\u002F1.create-a-workspace","Workspace",{"title":114,"path":115,"stem":116,"navTitle":117},"Writing values to the device","\u002Fen\u002Fvisualization\u002Fwrite-to-device","en\u002F05.visualization\u002F10.write-to-device","Writing to the device",{"title":119,"path":120,"stem":121,"navTitle":119},"Add a control","\u002Fen\u002Fvisualization\u002Fadd-a-control","en\u002F05.visualization\u002F2.add-a-control",{"title":123,"path":124,"stem":125,"navTitle":126},"Bind a control to a variable","\u002Fen\u002Fvisualization\u002Fbind-a-control","en\u002F05.visualization\u002F3.bind-a-control","Bind a control",{"title":128,"path":129,"stem":130,"navTitle":131},"Graph — signal time course","\u002Fen\u002Fvisualization\u002Fgraph-control","en\u002F05.visualization\u002F4.graph-control","Graph",{"title":133,"path":134,"stem":135,"navTitle":136},"XY Graph — signal versus signal","\u002Fen\u002Fvisualization\u002Fxy-graph-control","en\u002F05.visualization\u002F5.xy-graph-control","XY Graph",{"title":138,"path":139,"stem":140,"navTitle":141},"Gauge — instantaneous value indicator","\u002Fen\u002Fvisualization\u002Fgauge-control","en\u002F05.visualization\u002F6.gauge-control","Gauge",{"title":143,"path":144,"stem":145,"navTitle":146},"Single-Signal — a value with a caption","\u002Fen\u002Fvisualization\u002Fsignal-control","en\u002F05.visualization\u002F7.signal-control","Single-Signal",{"title":148,"path":149,"stem":150,"navTitle":151},"Watch Table — a table of variables","\u002Fen\u002Fvisualization\u002Fwatch-table-control","en\u002F05.visualization\u002F8.watch-table-control","Watch Table",{"title":153,"path":154,"stem":155,"navTitle":156},"Matrix control — maps and calibration","\u002Fen\u002Fvisualization\u002Fmatrix-control","en\u002F05.visualization\u002F9.matrix-control","Matrix control",{"title":158,"navTitle":15,"path":159,"stem":160,"children":161,"page":40},"Running and Monitoring","\u002Fen\u002Frunning","en\u002F06.running",[162,166],{"title":163,"path":164,"stem":165,"navTitle":163},"Start and stop","\u002Fen\u002Frunning\u002Fstart-and-stop","en\u002F06.running\u002F1.start-and-stop",{"title":167,"path":168,"stem":169,"navTitle":170},"Watching live data","\u002Fen\u002Frunning\u002Fwatching-live-data","en\u002F06.running\u002F2.watching-live-data","Live data",{"title":172,"navTitle":15,"path":173,"stem":174,"children":175,"page":40},"Logging and Replay","\u002Fen\u002Flogging-and-replay","en\u002F07.logging-and-replay",[176,180,185],{"title":177,"path":178,"stem":179,"navTitle":177},"Logging data","\u002Fen\u002Flogging-and-replay\u002Flogging-data","en\u002F07.logging-and-replay\u002F1.logging-data",{"title":181,"path":182,"stem":183,"navTitle":184},"Replaying a log","\u002Fen\u002Flogging-and-replay\u002Freplaying-a-log","en\u002F07.logging-and-replay\u002F2.replaying-a-log","Replay",{"title":186,"path":187,"stem":188,"navTitle":189},"Exporting data","\u002Fen\u002Flogging-and-replay\u002Fexporting-data","en\u002F07.logging-and-replay\u002F3.exporting-data","Export",{"title":191,"navTitle":15,"path":192,"stem":193,"children":194,"page":40},"Python Scripts","\u002Fen\u002Fpython-scripts","en\u002F08.python-scripts",[195,199,203,207],{"title":196,"path":197,"stem":198,"navTitle":12},"Scripts overview","\u002Fen\u002Fpython-scripts\u002Fscripts-overview","en\u002F08.python-scripts\u002F1.scripts-overview",{"title":200,"path":201,"stem":202,"navTitle":200},"Accessing variables","\u002Fen\u002Fpython-scripts\u002Faccessing-variables","en\u002F08.python-scripts\u002F2.accessing-variables",{"title":204,"path":205,"stem":206,"navTitle":204},"Example script","\u002Fen\u002Fpython-scripts\u002Fexample-script","en\u002F08.python-scripts\u002F3.example-script",{"title":208,"path":209,"stem":210,"navTitle":208},"CSV post-processing","\u002Fen\u002Fpython-scripts\u002Fcsv-post-processing","en\u002F08.python-scripts\u002F4.csv-post-processing",{"title":212,"navTitle":15,"path":213,"stem":214,"children":215,"page":40},"Custom extensions","\u002Fen\u002Fcustom-extensions","en\u002F09.custom-extensions",[216,220,224,228,233],{"title":217,"path":218,"stem":219,"navTitle":217},"Custom driver","\u002Fen\u002Fcustom-extensions\u002Fcustom-driver","en\u002F09.custom-extensions\u002F1.custom-driver",{"title":221,"path":222,"stem":223,"navTitle":221},"Custom protocol","\u002Fen\u002Fcustom-extensions\u002Fcustom-protocol","en\u002F09.custom-extensions\u002F2.custom-protocol",{"title":225,"path":226,"stem":227,"navTitle":225},"Custom Control","\u002Fen\u002Fcustom-extensions\u002Fcustom-control","en\u002F09.custom-extensions\u002F3.custom-control",{"title":229,"path":230,"stem":231,"navTitle":232},"Complete example — ISS position","\u002Fen\u002Fcustom-extensions\u002Fiss-example","en\u002F09.custom-extensions\u002F4.iss-example","Example ISS",{"title":234,"path":235,"stem":236,"navTitle":237},"Complete example — temperature sensor","\u002Fen\u002Fcustom-extensions\u002Ftemp-sensor-example","en\u002F09.custom-extensions\u002F5.temp-sensor-example","Example temp sensor",{"title":239,"navTitle":15,"path":240,"stem":241,"children":242,"page":40},"QFW SDK","\u002Fen\u002Fdevice-sdk","en\u002F10.device-sdk",[243,248,253,258,263,268,273,278],{"title":244,"path":245,"stem":246,"navTitle":247},"QFW SDK — introduction","\u002Fen\u002Fdevice-sdk\u002Fintroduction","en\u002F10.device-sdk\u002F1.introduction","Introduction",{"title":249,"path":250,"stem":251,"navTitle":252},"XCP in the QFW SDK","\u002Fen\u002Fdevice-sdk\u002Fxcp","en\u002F10.device-sdk\u002F2.xcp","XCP",{"title":254,"path":255,"stem":256,"navTitle":257},"Integration step by step: XCP on TCP with FreeRTOS + lwIP","\u002Fen\u002Fdevice-sdk\u002Fintegration-tcp","en\u002F10.device-sdk\u002F3.integration-tcp","Integration: XCP on TCP",{"title":259,"path":260,"stem":261,"navTitle":262},"XCP on classic CAN — what changes","\u002Fen\u002Fdevice-sdk\u002Fcan","en\u002F10.device-sdk\u002F4.can","XCP on classic CAN",{"title":264,"path":265,"stem":266,"navTitle":267},"Integration without an RTOS: XCP on TCP from the main loop","\u002Fen\u002Fdevice-sdk\u002Fbaremetal","en\u002F10.device-sdk\u002F5.baremetal","Integration without an RTOS",{"title":269,"path":270,"stem":271,"navTitle":272},"The engine contract","\u002Fen\u002Fdevice-sdk\u002Fengine-contract","en\u002F10.device-sdk\u002F6.engine-contract","Engine contract",{"title":274,"path":275,"stem":276,"navTitle":277},"Variable addresses for QInsight","\u002Fen\u002Fdevice-sdk\u002Fvariable-addresses","en\u002F10.device-sdk\u002F7.variable-addresses","Variable addresses",{"title":279,"path":280,"stem":281,"navTitle":282},"Troubleshooting the SDK integration","\u002Fen\u002Fdevice-sdk\u002Ftroubleshooting","en\u002F10.device-sdk\u002F8.troubleshooting","Troubleshooting",{"title":284,"navTitle":15,"path":285,"stem":286,"children":287,"page":40},"Reference","\u002Fen\u002Freference","en\u002F11.reference",[288,292,296,300],{"title":289,"path":290,"stem":291,"navTitle":289},"Drivers","\u002Fen\u002Freference\u002Fdrivers","en\u002F11.reference\u002F1.drivers",{"title":293,"path":294,"stem":295,"navTitle":293},"Protocols","\u002Fen\u002Freference\u002Fprotocols","en\u002F11.reference\u002F2.protocols",{"title":297,"path":298,"stem":299,"navTitle":297},"Controls","\u002Fen\u002Freference\u002Fcontrols","en\u002F11.reference\u002F3.controls",{"title":282,"path":301,"stem":302,"navTitle":282},"\u002Fen\u002Freference\u002Ftroubleshooting","en\u002F11.reference\u002F4.troubleshooting",{"title":304,"navTitle":15,"path":305,"stem":306,"children":307,"page":40},"Examples","\u002Fen\u002Fexamples","en\u002F12.examples",[308,312,317,322,327,331,335,339,343,347,352,357,362],{"title":309,"path":310,"stem":311,"navTitle":309},"Simulation: all signals","\u002Fen\u002Fexamples\u002Fsimulation-all-signals","en\u002F12.examples\u002F01.simulation-all-signals",{"title":313,"path":314,"stem":315,"navTitle":316},"Modbus RTU master over a serial line","\u002Fen\u002Fexamples\u002Fserial-modbus-master","en\u002F12.examples\u002F02.serial-modbus-master","Modbus RTU master",{"title":318,"path":319,"stem":320,"navTitle":321},"Modbus RTU slave with simulated sensors","\u002Fen\u002Fexamples\u002Fserial-modbus-slave","en\u002F12.examples\u002F03.serial-modbus-slave","Modbus RTU slave",{"title":323,"path":324,"stem":325,"navTitle":326},"Modbus TCP master over a TCP client","\u002Fen\u002Fexamples\u002Ftcp-client-modbus-master","en\u002F12.examples\u002F04.tcp-client-modbus-master","Modbus TCP master",{"title":328,"path":329,"stem":330,"navTitle":328},"Modbus TCP slave on the TCP Server","\u002Fen\u002Fexamples\u002Ftcp-server-modbus-slave","en\u002F12.examples\u002F05.tcp-server-modbus-slave",{"title":332,"path":333,"stem":334,"navTitle":332},"Bit field and a script","\u002Fen\u002Fexamples\u002Fbit-field-script","en\u002F12.examples\u002F08.bit-field-script",{"title":336,"path":337,"stem":338,"navTitle":336},"Two ECUs at once","\u002Fen\u002Fexamples\u002Ftwo-ecus","en\u002F12.examples\u002F09.two-ecus",{"title":340,"path":341,"stem":342,"navTitle":340},"ISS position live","\u002Fen\u002Fexamples\u002Fiss-live-tracking","en\u002F12.examples\u002F10.iss-live-tracking",{"title":344,"path":345,"stem":346,"navTitle":344},"Simulated thermometer","\u002Fen\u002Fexamples\u002Fsimul-temp-measure","en\u002F12.examples\u002F11.simul-temp-measure",{"title":348,"path":349,"stem":350,"navTitle":351},"JSON signals from a Python generator","\u002Fen\u002Fexamples\u002Fjson-signal-python","en\u002F12.examples\u002F12.json-signal-python","JSON signals from Python",{"title":353,"path":354,"stem":355,"navTitle":356},"Raw CAN frames from a Raspberry Pi","\u002Fen\u002Fexamples\u002Fraw-can-python","en\u002F12.examples\u002F13.raw-can-python","Raw CAN from a Raspberry Pi",{"title":358,"path":359,"stem":360,"navTitle":361},"XCP on TCP on a NUCLEO-H723ZG: measurement, stimulation and calibration maps","\u002Fen\u002Fexamples\u002Ftcp-client-xcp-nucleo-maps","en\u002F12.examples\u002F14.tcp-client-xcp-nucleo-maps","XCP on TCP on NUCLEO-H723ZG",{"title":363,"path":364,"stem":365,"navTitle":366},"XCP on CAN on a NUCLEO-H723ZG: measurement, stimulation and calibration maps","\u002Fen\u002Fexamples\u002Fcan-xcp-nucleo-maps","en\u002F12.examples\u002F15.can-xcp-nucleo-maps","XCP on CAN on NUCLEO-H723ZG",{"id":368,"title":259,"body":369,"description":1050,"extension":1051,"meta":1052,"navTitle":262,"navigation":1053,"path":260,"seo":1054,"stem":261,"__hash__":1055},"docs_en\u002Fen\u002F10.device-sdk\u002F4.can.md",{"type":370,"value":371,"toc":1040},"minimark",[372,376,403,408,560,563,567,602,606,630,691,695,702,839,864,872,883,887,905,909,970,974,1022,1026,1036],[373,374,259],"h1",{"id":375},"xcp-on-classic-can-what-changes",[377,378,379,380,384,385,388,389,393,394,398,399,402],"p",{},"The example builds the CAN image with the preset ",[381,382,383],"code",{},"DebugCan","; everything in\nthis chapter is what that preset changes compared to ",[381,386,387],{},"Debug"," (the TCP\nimage described in ",[390,391,257],"a",{"href":392},"\u002Fdevice-sdk\u002Fintegration-tcp",").\nThe ST peripheral is called ",[395,396,397],"strong",{},"FDCAN","; the SDK uses it in ",[395,400,401],{},"classic CAN\nmode"," (8-byte frames, no bit-rate switching) — from here on: classic CAN.",[404,405,407],"h2",{"id":406},"same-and-different","Same and different",[409,410,411,424],"table",{},[412,413,414],"thead",{},[415,416,417,421],"tr",{},[418,419,420],"th",{},"Same as TCP",[418,422,423],{},"Different on CAN",[425,426,427,455,469,493,532,549],"tbody",{},[415,428,429,436],{},[430,431,432,433],"td",{},"the engine sources and ",[381,434,435],{},"qfw_xcp.h",[430,437,438,439,442,443,446,447,450,451,454],{},"the transport codec compiled into the engine: ",[381,440,441],{},"qfw_xcptl_can.c"," instead of ",[381,444,445],{},"qfw_xcptl.c"," (selected by ",[381,448,449],{},"QFW_XCP_TRANSPORT=can",", no framing on the wire, ",[381,452,453],{},"MAX_CTO = MAX_DTO = 8",")",[415,456,457,460],{},[430,458,459],{},"the clock port and the clock contract",[430,461,462,463,442,466],{},"the glue: ",[381,464,465],{},"glue\u002Ffreertos_can\u002Fxcp_can_glue.c",[381,467,468],{},"glue\u002Ffreertos_lwip\u002Fxcp_sdk_glue.c",[415,470,471,482],{},[430,472,473,474,477,478,481],{},"identity (",[381,475,476],{},"project_name",", ",[381,479,480],{},"epk","), log, critical section, queue memory",[430,483,484,485,488,489,492],{},"the port: ",[381,486,487],{},"port\u002Ffdcan"," (FDCAN wrapper) in addition to ",[381,490,491],{},"port\u002Fclock","; lwIP is not needed",[415,494,495,509],{},[430,496,497,498,501,502,477,505,508],{},"events: ",[381,499,500],{},"qfw_xcp_create_event"," \u002F ",[381,503,504],{},"qfw_xcp_trigger_event",[381,506,507],{},"daqId"," in QInsight",[430,510,511,512,515,516,477,519,477,522,477,525,528,529],{},"the glue config: ",[381,513,514],{},"tQfwXcpCanGlueConfig"," (",[381,517,518],{},"master_id",[381,520,521],{},"slave_id",[381,523,524],{},"extended_ids",[381,526,527],{},"bitrate_kbps",") instead of ",[381,530,531],{},"port",[415,533,534,540],{},[430,535,536,537],{},"the three calls in ",[381,538,539],{},"freertos.c",[430,541,542,543,442,546],{},"the receive entry: ",[381,544,545],{},"qfw_xcp_rx_can_frame(data, dlc)",[381,547,548],{},"qfw_xcp_rx(bytes, len)",[415,550,551,554],{},[430,552,553],{},"the variable rules and the address tools",[430,555,556,559],{},[381,557,558],{},"#if defined(QFW_XCP_TRANSPORT_CAN)"," in the integration file selects the glue header and config",[377,561,562],{},"One firmware image carries exactly one transport (the two engine variants\ncollide on their symbols by design).",[404,564,566],{"id":565},"build-selection","Build selection",[377,568,569,572,573,515,575,578,579,582,583,477,586,589,590,593,594,597,598,601],{},[381,570,571],{},"cmake --preset DebugCan"," sets ",[381,574,449],{},[381,576,577],{},"CMakePresets.json",");\nin your own project pass ",[381,580,581],{},"-DQFW_XCP_TRANSPORT=can"," at configure time. The\nCMake snippet of the TCP chapter then adds\n",[381,584,585],{},"${QFW_XCP_GLUE_FREERTOS_CAN_SOURCES}",[381,587,588],{},"${QFW_XCP_PORT_FDCAN_SOURCES}",",\nthe matching include directories and the definitions\n",[381,591,592],{},"QFW_XCP_TRANSPORT_CAN"," (for your integration file) and\n",[381,595,596],{},"${QFW_XCP_PORT_FDCAN_DEFINES}"," (= ",[381,599,600],{},"HAL_FDCAN_MODULE_ENABLED",").",[404,603,605],{"id":604},"the-fdcan-port-and-your-cubemx-project","The FDCAN port and your CubeMX project",[377,607,608,611,612,615,616,477,619,622,623,477,626,629],{},[381,609,610],{},"port\u002Ffdcan\u002Ffdcan_classic.c"," brings up FDCAN1 completely in code: FDCAN\nkernel clock from HSE (8 MHz on the Nucleo, the bit-timing table is\ncomputed for it), GPIO PD0 = FDCAN1_RX \u002F PD1 = FDCAN1_TX (AF9), classic\nframe format, message RAM layout (32-deep RX FIFO0, 16-deep TX FIFO), one\nacceptance filter passing ",[395,613,614],{},"only"," the master id into RX FIFO0 (everything\nelse and all remote frames rejected), polled operation without interrupts.\nAPI: ",[381,617,618],{},"FdcanClassic_Init(&cfg)",[381,620,621],{},"FdcanClassic_Receive(data, &dlc)",",\n",[381,624,625],{},"FdcanClassic_Transmit(data, len)",[381,627,628],{},"FdcanClassic_RecoverBusOff()",".\nSupported bitrates: 125, 250, 500, 1000 kbit\u002Fs.",[377,631,632,635,636,639,640,643,644,647,648,651,652,655,656,659,660,662,663,665,666,669,670,672,673,622,676,477,679,682,683,686,687,690],{},[381,633,634],{},"port\u002Ffdcan\u002Fhal\u002F"," contains the ST HAL FDCAN driver (STM32Cube FW_H7\nV1.13.0, verbatim, BSD-3-Clause, see ",[381,637,638],{},"port\u002Ffdcan\u002FORIGIN.md","). The example\ndoes ",[395,641,642],{},"not"," enable FDCAN in its ",[381,645,646],{},".ioc",": the peripheral is brought up\nentirely by ",[381,649,650],{},"FdcanClassic_Init"," (clock, GPIO, filter, message RAM), and the\nHAL driver comes from ",[381,653,654],{},"port\u002Ffdcan\u002Fhal"," because CubeMX does not copy it into\n",[381,657,658],{},"Drivers\u002F"," for a peripheral that is not enabled. Follow the same pattern in\nyour project: leave FDCAN out of the ",[381,661,646],{},", add\n",[381,664,610],{}," and ",[381,667,668],{},"port\u002Ffdcan\u002Fhal\u002Fstm32h7xx_hal_fdcan.c"," to\nyour target with the include directories and ",[381,671,600],{},"\n(the variables ",[381,674,675],{},"QFW_XCP_PORT_FDCAN_SOURCES",[381,677,678],{},"QFW_XCP_PORT_FDCAN_INCLUDE_DIRS",[381,680,681],{},"QFW_XCP_PORT_FDCAN_DEFINES"," from\n",[381,684,685],{},"cmake\u002Fqfw_xcp.cmake"," do exactly that, see the example's\n",[381,688,689],{},"CMakeLists.txt","). This is the configuration verified on the NUCLEO-H723ZG\nwith QInsight.",[404,692,694],{"id":693},"integration-file-and-glue","Integration file and glue",[377,696,697,698,701],{},"The CAN branch of the example's ",[381,699,700],{},"app\u002Fxcp_server.c",":",[703,704,709],"pre",{"className":705,"code":706,"language":707,"meta":708,"style":708},"language-c shiki shiki-themes github-light github-dark-default","#if defined(QFW_XCP_TRANSPORT_CAN)\n#include \"xcp_can_glue.h\"\n#define QFW_XCP_CAN_MASTER_ID 0x200U     \u002F* QInsight default: master -> slave *\u002F\n#define QFW_XCP_CAN_SLAVE_ID 0x201U      \u002F* slave -> master *\u002F\n#define QFW_XCP_CAN_BITRATE_KBPS 500U\n#endif\n...\n    tQfwXcpCanGlueConfig config = {\n        .project_name = QFW_XCP_PROJECT_NAME,\n        .epk = QFW_XCP_EPK,\n        .master_id = QFW_XCP_CAN_MASTER_ID,\n        .slave_id = QFW_XCP_CAN_SLAVE_ID,\n        .extended_ids = false,           \u002F* 11-bit identifiers *\u002F\n        .bitrate_kbps = QFW_XCP_CAN_BITRATE_KBPS,\n        .log_level = 2U,\n        .get_clock_us = QfwXcpClockUs,\n    };\n    if (!QfwXcpCanGlue_Init(&config))\n    {\n        return false;\n    }\n","c","",[381,710,711,719,725,731,737,743,749,755,761,767,773,779,785,791,797,803,809,815,821,827,833],{"__ignoreMap":708},[712,713,716],"span",{"class":714,"line":715},"line",1,[712,717,718],{},"#if defined(QFW_XCP_TRANSPORT_CAN)\n",[712,720,722],{"class":714,"line":721},2,[712,723,724],{},"#include \"xcp_can_glue.h\"\n",[712,726,728],{"class":714,"line":727},3,[712,729,730],{},"#define QFW_XCP_CAN_MASTER_ID 0x200U     \u002F* QInsight default: master -> slave *\u002F\n",[712,732,734],{"class":714,"line":733},4,[712,735,736],{},"#define QFW_XCP_CAN_SLAVE_ID 0x201U      \u002F* slave -> master *\u002F\n",[712,738,740],{"class":714,"line":739},5,[712,741,742],{},"#define QFW_XCP_CAN_BITRATE_KBPS 500U\n",[712,744,746],{"class":714,"line":745},6,[712,747,748],{},"#endif\n",[712,750,752],{"class":714,"line":751},7,[712,753,754],{},"...\n",[712,756,758],{"class":714,"line":757},8,[712,759,760],{},"    tQfwXcpCanGlueConfig config = {\n",[712,762,764],{"class":714,"line":763},9,[712,765,766],{},"        .project_name = QFW_XCP_PROJECT_NAME,\n",[712,768,770],{"class":714,"line":769},10,[712,771,772],{},"        .epk = QFW_XCP_EPK,\n",[712,774,776],{"class":714,"line":775},11,[712,777,778],{},"        .master_id = QFW_XCP_CAN_MASTER_ID,\n",[712,780,782],{"class":714,"line":781},12,[712,783,784],{},"        .slave_id = QFW_XCP_CAN_SLAVE_ID,\n",[712,786,788],{"class":714,"line":787},13,[712,789,790],{},"        .extended_ids = false,           \u002F* 11-bit identifiers *\u002F\n",[712,792,794],{"class":714,"line":793},14,[712,795,796],{},"        .bitrate_kbps = QFW_XCP_CAN_BITRATE_KBPS,\n",[712,798,800],{"class":714,"line":799},15,[712,801,802],{},"        .log_level = 2U,\n",[712,804,806],{"class":714,"line":805},16,[712,807,808],{},"        .get_clock_us = QfwXcpClockUs,\n",[712,810,812],{"class":714,"line":811},17,[712,813,814],{},"    };\n",[712,816,818],{"class":714,"line":817},18,[712,819,820],{},"    if (!QfwXcpCanGlue_Init(&config))\n",[712,822,824],{"class":714,"line":823},19,[712,825,826],{},"    {\n",[712,828,830],{"class":714,"line":829},20,[712,831,832],{},"        return false;\n",[712,834,836],{"class":714,"line":835},21,[712,837,838],{},"    }\n",[377,840,841,515,844,846,847,849,850,477,853,856,857,860,861,701],{},[381,842,843],{},"QfwXcpCanGlue_Init",[381,845,465],{},") creates the\nrecursive mutex, initializes the engine (3 queue segments), calls\n",[381,848,650],{}," with ",[381,851,852],{},"rx_id = master_id",[381,854,855],{},"tx_id = slave_id",", and\ncreates the server task ",[381,858,859],{},"QfwXcpCanGlue"," (4 KB stack, priority idle+2). The\ntask loop runs every ",[395,862,863],{},"1 ms",[703,865,870],{"className":866,"code":868,"language":869,"meta":708},[867],"language-text","drain RX FIFO0  ->  qfw_xcp_rx_can_frame() per frame   (one frame = one XCP packet, no framing)\nqfw_xcp_poll()  ->  GlueTransmit -> FdcanClassic_Transmit (one call = one frame on slave_id, len 8, zero padded)\nFdcanClassic_RecoverBusOff() true?  ->  qfw_xcp_on_transport_reset()   (the only transport reset on CAN)\nvTaskDelay(1)\n","text",[381,871,868],{"__ignoreMap":708},[377,873,874,875,878,879,882],{},"There is no connection and no byte stream: a malformed frame is dropped by\nthe engine and nothing needs to be resynchronized; a full TX FIFO is clean\nbackpressure (",[381,876,877],{},"transmit"," returns ",[381,880,881],{},"false",", the engine retries the frame on\nthe next poll). The 32-deep RX FIFO holds more than 8 ms of a fully loaded\n500 kbit\u002Fs bus, so the 1 ms cadence has margin.",[404,884,886],{"id":885},"wiring-nucleo-h723zg","Wiring (NUCLEO-H723ZG)",[377,888,889,890,665,893,896,897,900,901,904],{},"FDCAN1 uses ",[395,891,892],{},"PD0 = FDCAN1_RX",[395,894,895],{},"PD1 = FDCAN1_TX"," (AF9). The Nucleo\nhas ",[395,898,899],{},"no CAN transceiver"," — connect an external 3.3 V transceiver\n(e.g. SN65HVD230, TJA1051T\u002F3): its TXD to PD1, RXD to PD0, VCC 3.3 V,\ncommon GND, CANH\u002FCANL to the bus with ",[395,902,903],{},"120 Ω termination at both cable\nends"," (the PCAN-USB side usually provides one).",[404,906,908],{"id":907},"qinsight-side","QInsight side",[377,910,911,912,916,917,920,921,924,925,849,929,622,932,477,935,938,939,941,942,945,946,949,950,953,954,957,958,960,961,964,965,969],{},"Driver ",[390,913,915],{"href":914},"\u002Freference\u002Fdrivers#peak-can-adapter","PEAK CAN Adapter"," (PCAN-USB;\n",[381,918,919],{},"bitrate=500000"," (bit\u002Fs), ",[381,922,923],{},"deviceId"," = the ID of your adapter), protocol\n",[390,926,928],{"href":927},"\u002Freference\u002Fprotocols#xcp-on-can","XCP on CAN",[381,930,931],{},"masterId=0x200",[381,933,934],{},"slaveId=0x201",[381,936,937],{},"extendedIds=false",". Variables, events and ",[381,940,507],{}," are\nconfigured exactly as on TCP. Values longer than one frame are chained by\nQInsight automatically: reads in pieces of at most 7 B (",[381,943,944],{},"SHORT_UPLOAD",",\nthen ",[381,947,948],{},"UPLOAD","), writes as ",[381,951,952],{},"SET_MTA"," followed by ",[381,955,956],{},"DOWNLOAD","s of at most\n6 B — an 8-byte value is read as 7+1 B and written as 6+2 B; with a\nblock-mode slave an 8-byte value is one ",[381,959,948],{}," burst of 7+1 B. The example project\n",[381,962,963],{},"Qenex_CAN_XCP_NucleoH723_Maps_FreeRTOS.qproj"," is described under\n",[390,966,968],{"href":967},"\u002Fexamples\u002Fcan-xcp-nucleo-maps","XCP on CAN on a NUCLEO-H723ZG",".",[404,971,973],{"id":972},"sizing-and-throughput","Sizing and throughput",[975,976,977,987,1001,1007],"ul",{},[978,979,980,515,983,986],"li",{},[395,981,982],{},"Transmit queue: 2–4 segments",[381,984,985],{},"QFW_XCP_QUEUE_MEM_SIZE(3)"," = 4632 B is\nthe glue default). CAN carries at most 6 payload bytes per DAQ frame at\n~4000 frames\u002Fs (500 kbit\u002Fs, whole bus) — a larger queue only deepens the\nbacklog, it cannot raise the throughput.",[978,988,989,992,993,996,997,1000],{},[395,990,991],{},"DAQ capacity per frame:"," the identification field is 2 bytes (ODT +\nDAQ number); with slave timestamps (",[381,994,995],{},"daqTimestamps=slave",") the first\nODT of a list additionally carries a DWORD timestamp → 2 B data in ODT0,\n6 B in every other ODT. With ",[381,998,999],{},"daqTimestamps=master"," all ODTs carry 6 B.",[978,1002,1003,1006],{},[395,1004,1005],{},"Overrun indication:"," a transmit queue overflow (easy to reach on CAN\nwith an ambitious DAQ set) is reported per the XCP standard by setting\nthe MSB of the ODT number in the first DTO after the overflow — QInsight\nshows the losses; whole frames are dropped, data is never corrupted.",[978,1008,1009,1010,477,1013,477,1016,515,1019,601],{},"Not implemented (optional per the standard, unused by QInsight):\n",[381,1011,1012],{},"GET_SLAVE_ID",[381,1014,1015],{},"GET_DAQ_ID",[381,1017,1018],{},"SET_DAQ_ID",[381,1020,1021],{},"ERR_CMD_UNKNOWN",[404,1023,1025],{"id":1024},"next","Next",[377,1027,1028,1031,1032,1035],{},[390,1029,269],{"href":1030},"\u002Fdevice-sdk\u002Fengine-contract"," — the rules behind the\nglue; ",[390,1033,282],{"href":1034},"\u002Fdevice-sdk\u002Ftroubleshooting"," — CAN rows in the\nsymptom table.",[1037,1038,1039],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":708,"searchDepth":727,"depth":727,"links":1041},[1042,1043,1044,1045,1046,1047,1048,1049],{"id":406,"depth":721,"text":407},{"id":565,"depth":721,"text":566},{"id":604,"depth":721,"text":605},{"id":693,"depth":721,"text":694},{"id":885,"depth":721,"text":886},{"id":907,"depth":721,"text":908},{"id":972,"depth":721,"text":973},{"id":1024,"depth":721,"text":1025},"What the CAN build of the SDK changes compared to TCP — the engine codec, the FreeRTOS + FDCAN glue, the FDCAN port and your CubeMX project, the integration file, wiring on the NUCLEO-H723ZG, the QInsight side, sizing and throughput.","md",{},true,{"title":259,"description":1050},"nldLpq6CsOep6WZdzLXZdGE-DiUyXB2li3Nr1EquzO8",[1057,1058],{"title":254,"path":255,"stem":256,"navTitle":257,"children":-1},{"title":264,"path":265,"stem":266,"navTitle":267,"children":-1},1791554568268]