C2000Ware Digital Power SDK  5.03.00.00
sfra_gui_scicomms_driverlib.c
Go to the documentation of this file.
1 //###########################################################################
2 //
3 // FILE: sfra_gui_scicomms_driverlib.c
4 //
5 // TITLE: Comms kernel as an interface to SFRA GUI
6 //
7 // AUTHOR: Manish Bhardwaj (C2000 Systems Solutions, Houston , TX)
8 //
9 //#############################################################################
10 // $TI Release: C2000 Software Frequency Response Analyzer Library v1.50.02.00 $
11 // $Release Date: Mon Aug 12 12:17:30 CDT 2024 $
12 // $Copyright:
13 // Copyright (C) 2024 Texas Instruments Incorporated - https://www.ti.com/
14 //
15 // ALL RIGHTS RESERVED
16 // $
17 //#############################################################################
18 
19 #include <stdint.h>
20 #include "driverlib.h"
21 #include "device.h"
23 
24 //
25 // Function prototypes for Command RECEIVE State machine
26 // ------------------------------------------------------------
27 //
28 void SFRA_GUI_getCmdByte(void);
29 void SFRA_GUI_echoCmdByte(void);
30 void SFRA_GUI_getSizeByte(void);
31 void SFRA_GUI_echoSizeByte(void);
32 void SFRA_GUI_getDataByte(void);
33 void SFRA_GUI_echoDataByte(void);
34 void SFRA_GUI_packWord(void);
35 void SFRA_GUI_packArray(void);
36 void SFRA_GUI_cmdInterpreter(void);
37 
38 //
39 // Function prototypes for Command Interpreter and dispatcher
40 //
41 void SFRA_GUI_lifePulseTsk(void); // 0
42 void SFRA_GUI_setText(void); // 1
43 void SFRA_GUI_setButton(void); // 2
44 void SFRA_GUI_setSlider(void); // 3
45 void SFRA_GUI_getVariable(void); // 4
46 void SFRA_GUI_getArray(void); // 5
47 void SFRA_GUI_getData(void); // 6
48 void SFRA_GUI_setData32(void); // 7
49 void SFRA_GUI_spareTsk08(void); // 8
50 
51 void SFRA_GUI_sendData(void);
52 
53 //
54 // Variable declarations
55 // State pointer for Command Packet Receive
56 //
58 
59 //
60 // Array of pointers to Function (that are tasks)
61 //
63 
64 volatile int16_t *SFRA_GUI_varSetTxtList[16];
65 volatile int16_t *SFRA_GUI_varSetBtnList[16];
66 volatile int16_t *SFRA_GUI_varSetSldrList[16];
67 volatile int16_t *SFRA_GUI_varGetList[16];
68 volatile int32_t *SFRA_GUI_arrayGetList[16];
69 volatile int16_t *SFRA_GUI_dataGetList[16];
70 volatile uint32_t *SFRA_GUI_dataSetList[16];
71 
72 volatile int16_t SFRA_GUI_commsOKflg;
73 volatile int16_t SFRA_GUI_serialCommsTimer;
74 
75 volatile uint32_t SFRA_GUI_sci_base_addr;
76 
79 uint16_t SFRA_GUI_rxChar;
80 uint16_t SFRA_GUI_rxWord;
85 
88 
91 
92 //
93 // for debug
94 //
96 
98 
102 
105 
106 uint32_t SFRA_GUI_temp;
107 
110 
112 
113 void SFRA_GUI_config(volatile uint32_t sci_base,
114  uint32_t vbus_clk,
115  uint32_t baudrate,
116  uint16_t scirx_gpio_pin,
117  uint32_t scirx_gpio_pin_config,
118  uint16_t scitx_gpio_pin,
119  uint32_t scitx_gpio_pin_config,
120  uint16_t led_indicator_flag,
121  uint16_t led_gpio_pin,
122  uint32_t led_gpio_pin_config,
123  SFRA_F32 *sfra,
124  uint16_t plot_option)
125 {
126  int16_t j = 0;
127 
128  //
129  // setup Gpio for SCI comms for SFRA
130  //
131 
132  GPIO_setPinConfig(scirx_gpio_pin_config);
133  GPIO_setPinConfig(scitx_gpio_pin_config);
134  GPIO_setQualificationMode(scirx_gpio_pin, GPIO_QUAL_ASYNC);
135  GPIO_setQualificationMode(scitx_gpio_pin, GPIO_QUAL_ASYNC);
136 
137  //
138  // Note: Assumes Clocks to SCI are turned on in setupDevice()->Device_init()
139  // Note: Assumes GPIO pins for SCIA are configured to Primary function
140  //
141 
142  //
143  // 1 stop bit, No parity, 8 char bits,
144  //
145  SCI_setConfig(sci_base,
146  vbus_clk, baudrate,
147  (SCI_CONFIG_WLEN_8 |
148  SCI_CONFIG_STOP_ONE |
149  SCI_CONFIG_PAR_NONE));
150  //
151  // No loopback
152  //
153  SCI_disableLoopback(sci_base);
154 
155  SCI_enableInterrupt(sci_base, SCI_INT_RXRDY_BRKDT | SCI_INT_TXRDY);
156 
157  //
158  // Relinquish SCI from Reset by SW Reset and setting TXE, and RXE bits
159  //
160  SCI_enableModule(sci_base);
161  SCI_performSoftwareReset(sci_base);
162 
163  HWREGH(sci_base + SCI_O_FFTX) = 0x8040;
164  HWREGH(sci_base + SCI_O_FFRX) = 0x204f;
165  HWREGH(sci_base + SCI_O_FFCT) = 0x0;
166 
167  //
168  // Disable RX ERR, SLEEP, TXWAKE
169  //
170  SCI_clearInterruptStatus(sci_base,
171  SCI_INT_TXRDY | SCI_INT_RXRDY_BRKDT );
172 
173  //
174  // Initialize the CmdPacket Rcv Handler state machine ptr
175  //
177  //
178  // DEBUG
179  //
181  //
182  // Init to 1st state
183  //
185  //
186  // Start with LSB during Byte-to-Word packing
187  //
189 
190  SFRA_GUI_dataOut16 = 0;
191  SFRA_GUI_dataOut32 = 0;
192 
193  //
194  // for debug
195  //
197 
198  SFRA_GUI_delayer = 0;
199 
200  SFRA_GUI_memGetPtr = 0;
201  SFRA_GUI_memGetAddress = 0x00000000;
203 
204  SFRA_GUI_memSetPtr = 0;
205  SFRA_GUI_memSetValue = 0x00000000;
206 
210 
211  SFRA_GUI_sci_base_addr = sci_base;
212 
213  //
214  // clear Command Packet
215  //
216  for (j = 0; j < SFRA_GUI_PKT_SIZE; j++)
217  {
218  SFRA_GUI_cmdPacket[j] = 0x0;
219  }
220 
221  j = 0;
222 
223  //
224  // init all dispatch Tasks
225  //
235 
236 
237 
238  SFRA_GUI_varSetBtnList[0] = (int16_t *)&(SFRA_GUI_sweep_start);
239 
240  SFRA_GUI_varGetList[0] = (int16_t *)&(sfra->vecLength);
241  SFRA_GUI_varGetList[1] = (int16_t *)&(sfra->status);
242  SFRA_GUI_varGetList[2] = (int16_t *)&(sfra->freqIndex);
243 
244  //
245  //"Setable" variables
246  // assign GUI "setable" by Text parameter address
247  //
248  SFRA_GUI_dataSetList[0] = (uint32_t *)&(sfra->freqStart);
249  SFRA_GUI_dataSetList[1] = (uint32_t *)&(sfra->amplitude);
250  SFRA_GUI_dataSetList[2] = (uint32_t *)&(sfra->freqStep);
251 
252  //
253  // assign a GUI "getable" parameter array address
254  //
255  SFRA_GUI_arrayGetList[0] = (int32_t *)sfra->freqVect;
256 
257 
258  if(plot_option == SFRA_GUI_PLOT_GH_CL)
259  {
260  SFRA_GUI_arrayGetList[1] = (int32_t *)sfra->gh_magVect;
261  SFRA_GUI_arrayGetList[2] = (int32_t *)sfra->gh_phaseVect;
262 
263  SFRA_GUI_arrayGetList[3] = (int32_t *)sfra->cl_magVect;
264  SFRA_GUI_arrayGetList[4] = (int32_t *)sfra->cl_phaseVect;
265  }
266  //
267  // default is to plot gh and h
268  //
269  else
270  {
271  SFRA_GUI_arrayGetList[1] = (int32_t *)sfra->gh_magVect;
272  SFRA_GUI_arrayGetList[2] = (int32_t *)sfra->gh_phaseVect;
273 
274  SFRA_GUI_arrayGetList[3] = (int32_t *)sfra->h_magVect;
275  SFRA_GUI_arrayGetList[4] = (int32_t *)sfra->h_phaseVect;
276  }
277 
278 
279 
280  SFRA_GUI_arrayGetList[5] = (int32_t *)&(sfra->freqStart);
281  SFRA_GUI_arrayGetList[6] = (int32_t *)&(sfra->amplitude);
282  SFRA_GUI_arrayGetList[7] = (int32_t *)&(sfra->freqStep);
283 
284 
285  if(led_indicator_flag == 1)
286  {
287  GPIO_setDirectionMode(led_gpio_pin, GPIO_DIR_MODE_OUT);
288  GPIO_setQualificationMode(led_gpio_pin, GPIO_QUAL_SYNC);
289  GPIO_setPinConfig(led_gpio_pin_config);
290  SFRA_GUI_led_flag = 1;
291  SFRA_GUI_led_gpio = led_gpio_pin;
292  }
293  else
294  {
295  SFRA_GUI_led_flag = 0;
296  }
297 
298 }
299 
300 //
301 // Host Command RECEIVE and DISPATCH State Machine
302 //
303 
304 //
305 // State Machine Entry Point
306 //
308 {
309  if(SFRA_GUI_sweep_start == 1)
310  {
312  sfra->start = 1;
313  }
314  //
315  // Call routine pointed to by state pointer
316  //
317  (*SFRA_GUI_rcvTaskPointer)();
318 
320 }
321 
322 
323 //
324 // Task 1
325 //
327 {
328  //
329  // check if a char has been received
330  //
331  if((SCI_getRxStatus(SFRA_GUI_sci_base_addr) & SCI_RXSTATUS_READY ) != 0)
332  {
333  SFRA_GUI_rxChar = SCI_readCharBlockingNonFIFO(SFRA_GUI_sci_base_addr);
334  //
335  // point to next state
336  //
339  //
340  // DEBUG
341  //RcvTskPtrShdw = 2;
342  //
344  }
345  //
346  //~2.5 s timeout, SFRA GUI function is called at 100Hz (recommended)
347  // hence 2500/100 = 2.5sec
348  //
349  else if((SCI_getRxStatus(SFRA_GUI_sci_base_addr)&SCI_RXSTATUS_BREAK) != 0
350  || SFRA_GUI_serialCommsTimer > 2500)
351  {
352 
353  SCI_enableModule(SFRA_GUI_sci_base_addr);
354 
355  //
356  // If break detected or serialport times out, reset SCI
357  //--- Needed by some serialports when code is run with an emulator
358  //
359  SCI_performSoftwareReset(SFRA_GUI_sci_base_addr);
360 
361  SCI_clearInterruptStatus(SFRA_GUI_sci_base_addr,
362  SCI_INT_TXRDY | SCI_INT_RXRDY_BRKDT);
363 
364  asm(" RPT#8 || NOP");
365 
366  //
367  // Init to 1st state
368  //
371 
372  //
373  // go back and wait for new CMD
374  //
377  }
378  else
379  {
380 
381  }
382 }
383 
384 //
385 // Task 2
386 //
388 {
389  //
390  // is TXBUF empty ?, that is TXRDY = 1
391  //
392  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
393  {
394  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr, SFRA_GUI_rxChar);
397  //
398  // DEBUG
399  // RcvTskPtrShdw = 3;
400  // Un-comment for simple echo test
401  // RcvTaskPointer = &GetCmdByte;
402  // Reset Time-out timer
403  //
405  }
406 
407 }
408 
409 //
410 // Task 3
411 //
413 {
414  //
415  // check if a char has been received
416  //
417  if((SCI_getRxStatus(SFRA_GUI_sci_base_addr) & SCI_RXSTATUS_READY ) != 0)
418  {
419  SFRA_GUI_rxChar = SCI_readCharBlockingNonFIFO(SFRA_GUI_sci_base_addr);
420 
421  //
422  // point to next state
423  //
425  //
426  // DEBUG
427  //RcvTskPtrShdw = 4;
428  //
430  }
431 
432  //
433  // 1000*1mS = 1.0 sec timeout, SFRA GUI function is called at 1ms
434  //
435  else if(SFRA_GUI_serialCommsTimer > 1000)
436  {
438  //
439  // Abort, go back wait for new CMD
440  //
443  }
444 }
445 
446 //
447 // Task 4
448 //
450 {
451  //
452  // is TXBUF empty ?, that is TXRDY = 1
453  //
454  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
455  {
456  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr, SFRA_GUI_rxChar);
459  //
460  // DEBUG
461  //RcvTskPtrShdw = 5;
462  // Un-comment for Test
463  //RcvTaskPointer = &GetCmdByte;
464  // Reset Time-out timer
465  //
467  }
468 }
469 
470 //
471 // Task 5
472 //
474 {
475  //
476  // check if a char has been received
477  //
478  if((SCI_getRxStatus(SFRA_GUI_sci_base_addr) & SCI_RXSTATUS_READY ) != 0)
479  {
480  SFRA_GUI_rxChar = SCI_readCharBlockingNonFIFO(SFRA_GUI_sci_base_addr);
481  //
482  // point to next state
483  //
485  //
486  // DEBUG
487  //RcvTskPtrShdw = 6;
488  //
490  }
491 
492  //
493  // 1000*1mS = 1 sec timeout, SFRA GUI function is called at 1ms/100Hz
494  //
495  else if(SFRA_GUI_serialCommsTimer > 1000)
496  {
498  //
499  // Abort, go back wait for new CMD
500  //
503  }
504 }
505 
506 //
507 // Task 6
508 //
510 {
511  //
512  // is TXBUF empty ?, that is TXRDY = 1
513  //
514  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
515  {
516  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr, SFRA_GUI_rxChar);
518  //
519  // DEBUG
520  //RcvTskPtrShdw = 7;
521  //
522  }
523 }
524 
525 //
526 // expects LSB first then MSB // Task 7
527 //
529 {
530  if(SFRA_GUI_lowByteFlag == 1)
531  {
535  //
536  // DEBUG
537  // RcvTskPtrShdw = 5;
538  //
540  }
541  else
542  {
545  //
546  // store data in packet
547  //
550  //
551  // DEBUG
552  // RcvTskPtrShdw = 8;
553  // indicate new task underway
554  //
556  }
557 }
558 
559 //
560 // Task 8
561 //
563 {
564  if(SFRA_GUI_taskDoneFlag == 0)
565  {
566  //
567  // dispatch Task
568  //
570  }
571 
572  //
573  // Incase Task never finishes
574  // 2500*1mS = 2.5 sec timeout
575  //
576  if(SFRA_GUI_serialCommsTimer > 2500)
577  {
579  //
580  // Abort, go back wait for new CMD
581  //
584  }
585  if(SFRA_GUI_taskDoneFlag == 1)
586  {
588  //
589  // DEBUG
590  //RcvTskPtrShdw = 1;
591  //
592  }
593 }
594 
595 //
596 // Slave Tasks commanded by Host
597 //
598 
599 //
600 // CmdPacket[0] = 0
601 //
603 {
604  if(SFRA_GUI_led_flag == 1)
605  {
606  //
607  // LED2-ON
608  //
609  if(SFRA_GUI_cmdPacket[2] == 0x0000 && SFRA_GUI_cmdPacket[1] == 0x00)
610  {
611  GPIO_togglePin(SFRA_GUI_led_gpio);
612  }
613  //
614  // LED2-OFF
615  //
616  if(SFRA_GUI_cmdPacket[2] == 0x0001 && SFRA_GUI_cmdPacket[1] == 0x00)
617  {
618  GPIO_togglePin(SFRA_GUI_led_gpio);
619  }
620  //
621  // LED2-Toggle
622  //
623  if(SFRA_GUI_cmdPacket[2] == 0x0002 && SFRA_GUI_cmdPacket[1] == 0x00)
624  {
625  GPIO_togglePin(SFRA_GUI_led_gpio);
626  }
627  }
628 
632 }
633 
634 //
635 // CmdPacket[0] = 1
636 //
638 {
640 
641  //
642  // indicate Task execution is complete
643  //
645 }
646 
647 //
648 // CmdPacket[0] = 2
649 //
651 {
653 
654  //
655  // indicate Task execution is complete
656  //
658 }
659 
660 //
661 // CmdPacket[0] = 3
662 //
664 {
666  //
667  // indicate Task execution is complete
668  //
670 }
671 
672 //
673 // CmdPacket[0] = 4
674 //
676 {
678 }
679 
680 //
681 //Send a Uint16 array one element at a time
682 // CmdPacket[0] = 5
683 //
685 {
687 }
688 
689 //
690 // CmdPacket[0] = 6
691 //
693 {
694  switch(SFRA_GUI_memGetPtr)
695  {
696  case 0:
698  SFRA_GUI_memGetPtr = 1;
699 
703  break;
704 
705  case 1:
708  (SFRA_GUI_temp << 16);
712 
713  if(SFRA_GUI_taskDoneFlag == 1)
714  {
715  SFRA_GUI_memGetPtr = 0;
716  }
717  break;
718  }
719 
720  //
721  // indicate Task execution is complete
722  // TaskDoneFlag = 1;
723  //
724 }
725 
726 //
727 // CmdPacket[0] = 7 [Edited to get 32-bit set text and set label working]
728 //
730 {
731  switch(SFRA_GUI_memSetPtr)
732  {
733  case 0:
735  SFRA_GUI_memSetPtr = 1;
736 
738  break;
739 
740  case 1:
743 
745 
746  SFRA_GUI_memSetPtr = 0;
748  break;
749  }
750 
751 }
752 
753 //
754 // CmdPacket[0] = 8
755 //
757 {
758  //
759  // indicate Task execution is complete
760  //
762 }
763 
764 //
765 //
766 //
768 {
769  if(SFRA_GUI_cmdPacket[0] == 0x04 || SFRA_GUI_cmdPacket[0] == 0x06)
770  {
771  switch(SFRA_GUI_sendTaskPtr)
772  {
773  case 0: //initialization
774 
776  (int16_t *) SFRA_GUI_varGetList[SFRA_GUI_cmdPacket[1]];
779  //
780  //Note that case 0 rolls into case 1 (no break)
781  //
782 
783  case 1: //send LSB
785  {
786  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
787  {
788  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr,
789  SFRA_GUI_dataOut16 & 0x000000FF);
791  }
792  }
793  else
794  {
797  break;
798  }
799 
800  case 2: //send MSB
801  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
802  {
803  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr,
804  SFRA_GUI_dataOut16 >> 8 & 0x000000FF);
805 
810  }
811  break;
812  }
813  }
814  else
815  {
816  switch(SFRA_GUI_sendTaskPtr)
817  {
818  case 0: //initialization
823  //
824  //Note that case 0 rolls into case 1 (no break)
825  //
826  case 1: //send LSB
828  {
829  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
830  {
831  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr,
832  SFRA_GUI_dataOut32 & 0x000000FF);
834  }
835  }
836  else
837  {
840  break;
841  }
842 
843  case 2:
844  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
845  {
846  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr,
847  SFRA_GUI_dataOut32 >> 8 & 0x000000FF);
849  }
850 
851  case 3:
852  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
853  {
854  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr,
855  SFRA_GUI_dataOut32 >> 16 & 0x000000FF);
857  }
858 
859  case 4:
860  //
861  // send MSB
862  //
863  if(SCI_isTransmitterBusy(SFRA_GUI_sci_base_addr) == 0)
864  {
865  SCI_writeCharBlockingNonFIFO(SFRA_GUI_sci_base_addr,
866  SFRA_GUI_dataOut32 >> 24 & 0x000000FF);
867 
872  }
873  break;
874  default:
875  break;
876  }
877  }
878 
879 }
880 
SFRA_GUI_rcvTaskPointer
void(* SFRA_GUI_rcvTaskPointer)(void)
Definition: sfra_gui_scicomms_driverlib.c:57
SFRA_GUI_config
void SFRA_GUI_config(volatile uint32_t sci_base, uint32_t vbus_clk, uint32_t baudrate, uint16_t scirx_gpio_pin, uint32_t scirx_gpio_pin_config, uint16_t scitx_gpio_pin, uint32_t scitx_gpio_pin_config, uint16_t led_indicator_flag, uint16_t led_gpio_pin, uint32_t led_gpio_pin_config, SFRA_F32 *sfra, uint16_t plot_option)
Configures the SFRA_GUI module.
Definition: sfra_gui_scicomms_driverlib.c:113
SFRA_GUI_setButton
void SFRA_GUI_setButton(void)
Definition: sfra_gui_scicomms_driverlib.c:650
SFRA_GUI_sci_base_addr
volatile uint32_t SFRA_GUI_sci_base_addr
Definition: sfra_gui_scicomms_driverlib.c:75
SFRA_GUI_memGetAmount
int16_t SFRA_GUI_memGetAmount
Definition: sfra_gui_scicomms_driverlib.c:101
SFRA_GUI_getData
void SFRA_GUI_getData(void)
Definition: sfra_gui_scicomms_driverlib.c:692
SFRA_GUI_rxWord
uint16_t SFRA_GUI_rxWord
Definition: sfra_gui_scicomms_driverlib.c:80
SFRA_F32
Defines the SFRA_F32 structure.
Definition: sfra_f32.h:63
SFRA_GUI_PLOT_GH_CL
#define SFRA_GUI_PLOT_GH_CL
Definition: sfra_gui_scicomms_driverlib.h:36
SFRA_F32::freqVect
float32_t * freqVect
Frequency Vector.
Definition: sfra_f32.h:70
SFRA_GUI_commsOKflg
volatile int16_t SFRA_GUI_commsOKflg
Definition: sfra_gui_scicomms_driverlib.c:72
SFRA_GUI_memGetPtr
int16_t SFRA_GUI_memGetPtr
Definition: sfra_gui_scicomms_driverlib.c:99
SFRA_GUI_lifePulseTsk
void SFRA_GUI_lifePulseTsk(void)
Definition: sfra_gui_scicomms_driverlib.c:602
SFRA_GUI_varGetList
volatile int16_t * SFRA_GUI_varGetList[16]
Definition: sfra_gui_scicomms_driverlib.c:67
SFRA_GUI_setSlider
void SFRA_GUI_setSlider(void)
Definition: sfra_gui_scicomms_driverlib.c:663
SFRA_GUI_rxChar
uint16_t SFRA_GUI_rxChar
Definition: sfra_gui_scicomms_driverlib.c:79
SFRA_GUI_dataOut32
int32_t SFRA_GUI_dataOut32
Definition: sfra_gui_scicomms_driverlib.c:87
SFRA_GUI_arrayGetList
volatile int32_t * SFRA_GUI_arrayGetList[16]
Definition: sfra_gui_scicomms_driverlib.c:68
SFRA_GUI_led_gpio
uint16_t SFRA_GUI_led_gpio
Definition: sfra_gui_scicomms_driverlib.c:109
SFRA_GUI_CMD_NUMBER
#define SFRA_GUI_CMD_NUMBER
Definition: sfra_gui_scicomms_driverlib.h:31
SFRA_GUI_getArray
void SFRA_GUI_getArray(void)
Definition: sfra_gui_scicomms_driverlib.c:684
SFRA_F32::h_phaseVect
float32_t * h_phaseVect
Plant Phase SFRA Vector.
Definition: sfra_f32.h:65
SFRA_GUI_taskDoneFlag
uint16_t SFRA_GUI_taskDoneFlag
Definition: sfra_gui_scicomms_driverlib.c:82
SFRA_GUI_sendData
void SFRA_GUI_sendData(void)
Definition: sfra_gui_scicomms_driverlib.c:767
SFRA_F32::cl_phaseVect
float32_t * cl_phaseVect
Closed Loop Phase SFRA Vector.
Definition: sfra_f32.h:69
SFRA_F32::freqIndex
int16_t freqIndex
Index of the frequency vector.
Definition: sfra_f32.h:79
SFRA_GUI_dataGetList
volatile int16_t * SFRA_GUI_dataGetList[16]
Definition: sfra_gui_scicomms_driverlib.c:69
SFRA_GUI_delayer
int16_t SFRA_GUI_delayer
Definition: sfra_gui_scicomms_driverlib.c:97
SFRA_GUI_memSetPtr
int16_t SFRA_GUI_memSetPtr
Definition: sfra_gui_scicomms_driverlib.c:103
SFRA_F32::amplitude
float32_t amplitude
Injection Amplitude.
Definition: sfra_f32.h:71
SFRA_F32::freqStart
float32_t freqStart
Start frequency of SFRA sweep.
Definition: sfra_f32.h:73
SFRA_GUI_numWords
uint16_t SFRA_GUI_numWords
Definition: sfra_gui_scicomms_driverlib.c:83
SFRA_GUI_PKT_SIZE
#define SFRA_GUI_PKT_SIZE
Definition: sfra_gui_scicomms_driverlib.h:30
SFRA_GUI_memGetAddress
uint32_t SFRA_GUI_memGetAddress
Definition: sfra_gui_scicomms_driverlib.c:100
SFRA_GUI_wordsLeftToGet
uint16_t SFRA_GUI_wordsLeftToGet
Definition: sfra_gui_scicomms_driverlib.c:84
SFRA_F32::cl_magVect
float32_t * cl_magVect
Closed Loop Mag SFRA Vector.
Definition: sfra_f32.h:68
SFRA_GUI_cmdInterpreter
void SFRA_GUI_cmdInterpreter(void)
Definition: sfra_gui_scicomms_driverlib.c:562
SFRA_F32::status
int16_t status
Status of SFRA.
Definition: sfra_f32.h:77
SFRA_GUI_memDataPtr32
int32_t * SFRA_GUI_memDataPtr32
Definition: sfra_gui_scicomms_driverlib.c:90
SFRA_F32::freqStep
float32_t freqStep
Log space between frequency points (optional)
Definition: sfra_f32.h:74
SFRA_GUI_echoSizeByte
void SFRA_GUI_echoSizeByte(void)
Definition: sfra_gui_scicomms_driverlib.c:449
SFRA_GUI_varSetTxtList
volatile int16_t * SFRA_GUI_varSetTxtList[16]
Definition: sfra_gui_scicomms_driverlib.c:64
SFRA_F32::h_magVect
float32_t * h_magVect
Plant Mag SFRA Vector.
Definition: sfra_f32.h:64
SFRA_GUI_spareTsk08
void SFRA_GUI_spareTsk08(void)
Definition: sfra_gui_scicomms_driverlib.c:756
sfra_gui_scicomms_driverlib.h
SFRA_GUI_temp
uint32_t SFRA_GUI_temp
Definition: sfra_gui_scicomms_driverlib.c:106
SFRA_GUI_lowByteFlag
uint16_t SFRA_GUI_lowByteFlag
Definition: sfra_gui_scicomms_driverlib.c:77
SFRA_GUI_runSerialHostComms
void SFRA_GUI_runSerialHostComms(SFRA_F32 *sfra)
Runs the serial host comms GUI , needs to be called at ~100ms for proper function.
Definition: sfra_gui_scicomms_driverlib.c:307
SFRA_GUI_dataSetList
volatile uint32_t * SFRA_GUI_dataSetList[16]
Definition: sfra_gui_scicomms_driverlib.c:70
SFRA_GUI_getSizeByte
void SFRA_GUI_getSizeByte(void)
Definition: sfra_gui_scicomms_driverlib.c:412
SFRA_GUI_cmdDispatcher
void(* SFRA_GUI_cmdDispatcher[SFRA_GUI_CMD_NUMBER])(void)
Definition: sfra_gui_scicomms_driverlib.c:62
SFRA_GUI_memDataPtr16
int16_t * SFRA_GUI_memDataPtr16
Definition: sfra_gui_scicomms_driverlib.c:89
SFRA_GUI_packWord
void SFRA_GUI_packWord(void)
Definition: sfra_gui_scicomms_driverlib.c:528
SFRA_GUI_setText
void SFRA_GUI_setText(void)
Definition: sfra_gui_scicomms_driverlib.c:637
SFRA_F32::vecLength
int16_t vecLength
No. of Points in the SFRA.
Definition: sfra_f32.h:78
SFRA_GUI_rcvTskPtrShdw
int16_t SFRA_GUI_rcvTskPtrShdw
Definition: sfra_gui_scicomms_driverlib.c:95
SFRA_GUI_sweep_start
uint16_t SFRA_GUI_sweep_start
Definition: sfra_gui_scicomms_driverlib.c:111
SFRA_GUI_varSetSldrList
volatile int16_t * SFRA_GUI_varSetSldrList[16]
Definition: sfra_gui_scicomms_driverlib.c:66
SFRA_GUI_getDataByte
void SFRA_GUI_getDataByte(void)
Definition: sfra_gui_scicomms_driverlib.c:473
SFRA_GUI_packArray
void SFRA_GUI_packArray(void)
SFRA_F32::gh_phaseVect
float32_t * gh_phaseVect
Open Loop Phase SFRA Vector.
Definition: sfra_f32.h:67
SFRA_GUI_serialCommsTimer
volatile int16_t SFRA_GUI_serialCommsTimer
Definition: sfra_gui_scicomms_driverlib.c:73
SFRA_GUI_setData32
void SFRA_GUI_setData32(void)
Definition: sfra_gui_scicomms_driverlib.c:729
SFRA_GUI_echoCmdByte
void SFRA_GUI_echoCmdByte(void)
Definition: sfra_gui_scicomms_driverlib.c:387
SFRA_GUI_dataOut16
uint16_t SFRA_GUI_dataOut16
Definition: sfra_gui_scicomms_driverlib.c:86
SFRA_GUI_memSetValue
uint32_t SFRA_GUI_memSetValue
Definition: sfra_gui_scicomms_driverlib.c:104
SFRA_GUI_sendTaskPtr
uint16_t SFRA_GUI_sendTaskPtr
Definition: sfra_gui_scicomms_driverlib.c:78
SFRA_GUI_cmdPacket
uint16_t SFRA_GUI_cmdPacket[SFRA_GUI_PKT_SIZE]
Definition: sfra_gui_scicomms_driverlib.c:81
SFRA_F32::gh_magVect
float32_t * gh_magVect
Open Loop Mag SFRA Vector.
Definition: sfra_f32.h:66
SFRA_GUI_getVariable
void SFRA_GUI_getVariable(void)
Definition: sfra_gui_scicomms_driverlib.c:675
SFRA_GUI_getCmdByte
void SFRA_GUI_getCmdByte(void)
Definition: sfra_gui_scicomms_driverlib.c:326
SFRA_GUI_varSetBtnList
volatile int16_t * SFRA_GUI_varSetBtnList[16]
Definition: sfra_gui_scicomms_driverlib.c:65
SFRA_F32::start
int16_t start
Command to start SFRA.
Definition: sfra_f32.h:75
SFRA_GUI_echoDataByte
void SFRA_GUI_echoDataByte(void)
Definition: sfra_gui_scicomms_driverlib.c:509
SFRA_GUI_led_flag
uint16_t SFRA_GUI_led_flag
Definition: sfra_gui_scicomms_driverlib.c:108