Can I use PRINF with fusion Library

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

Can I use PRINF with fusion Library

ソリューションへジャンプ
1,518件の閲覧回数
ciuas
Contributor I

I am using the 6DOFBareBoardeCompass/FRDM_KL26Z library program and I am trying to get output such as magnetometer readings written to Putty using the PRINFT function with no success. Is this actually possible and if not is there any other way of getting output written to putty. I can see the UART functions but I cant get them to work either.

Thanks.

ラベル(1)
0 件の賞賛
返信
1 解決策
1,332件の閲覧回数
michaelestanley
NXP Employee
NXP Employee

Ciu,

Because printf is a very large function, requiring a lot of memory, we don't include it in the standard build.  Instead, we use dedicated UART functions (which you've noted) to build up binary data structures to transmit data back to the Sensor Fusion Toolbox.  If you look at function CreateAndSendPacketsViaUART() in drivers.c, you will see that we hand packet a reusable buffer by:

  1. setting initial buffer pointer=0
  2. making repeated calls to sBufAppendItem to add data to the buffer
  3. calling UART_SendBlock to send the buffer when it is complete

The protocol is described in the user guide, and you can use the Sensor Fusion Toolbox to log data to a file.  I think you'll find the data you are after is already being transmitted.

Mike

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,333件の閲覧回数
michaelestanley
NXP Employee
NXP Employee

Ciu,

Because printf is a very large function, requiring a lot of memory, we don't include it in the standard build.  Instead, we use dedicated UART functions (which you've noted) to build up binary data structures to transmit data back to the Sensor Fusion Toolbox.  If you look at function CreateAndSendPacketsViaUART() in drivers.c, you will see that we hand packet a reusable buffer by:

  1. setting initial buffer pointer=0
  2. making repeated calls to sBufAppendItem to add data to the buffer
  3. calling UART_SendBlock to send the buffer when it is complete

The protocol is described in the user guide, and you can use the Sensor Fusion Toolbox to log data to a file.  I think you'll find the data you are after is already being transmitted.

Mike

0 件の賞賛
返信