Jump to content

Toby

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Hi Folks Ive recently started looking at using the F2802x SPI. For my application I would like to be able to communicate between two F2802x devices a string of 8-bit chars of arbitrary length (+using FIFOs), and I have a few questions. The slave device is able to request read service from the master by means of a GPIO line to the master that the master has configured as an external interrupt. The thing is I am not understanding the steps required for the master to begin a read from the slave.... I checked out the data transfer example (sect 1.5.5) in the SPI ref guide (SPRUG71B) but TBH I didn't really understand what it was trying to convey... I guess the master needs to transmit dummy bytes for every byte that it wants to receive, is that right? But how should the master "know" how many bytes that should be? Maybe it just keeps going until the slave clears the TALK bit? Thanks
  2. I found this in "development_kits/~SupportFiles/F2802x_headers/" along with the PeripheralHeaderIncludes.h file. I compiled, loaded and ran the program without errors - though have not yet actually tested functionality I tried restarting CCS (and my machine) to see if this would induce the indexer to re-index the _Comp header file, but no change, never mind. Thanks for the EALLOW mention, hadn't thought about that! Cheers P.S. I'll cross-post my solution to the e2e for anyone looking for a solution there also P.P.S. Have somewhat confirmed my changes by comparing the F2803x _Comp.h (as Devin suggested) in which the ramp registers ARE defined, and also has no mention in the relevant PeripheralAddress_ASM.h so I guess I dont need to add anything there. Also fixed the indexer issue by 1) exporting my preferences 2) restarted CCS with the -clean arg, then closed CCS again 3) Cleaned my workspace 4) Re-opened CCS and imported my preferences and project (had to re-setup my perspectives also). 5) Bingo! Instructions for the steps can be found on the TI wiki here. Step 2 is probably redundant but I tried it just to be sure! Also, on comparison to F2803x header I changed my DAC_CTL bit 14:15 from FREE to FREE_SOFT
  3. Trey so following on with what I outlined, and in case anyone else looking for the same thing stumbles across this post, I will document what I am doing here. Here is what I added to the DSP2802x_Comp.h file of the version 128 device support header includes: addition of the below struct and union (before the declaration of the struct COMP_REGS): struct DACCTL_BITS { // bit description Uint16 DACSOURCE:1; // 0 DAC source control Uint16 RAMPSOURCE:4; // 1:4 Ramp generator source sync select Uint16 rsvd1:9; // 5:13 reserved Uint16 FREE:2; // 14:15 Emulation mode behaviour }; union DACCTL_REG { Uint16 all; struct DACCTL_BITS bit; }; Then replaced the struct COMP_REGS with the following amended version: struct COMP_REGS { union COMPCTL_REG COMPCTL; Uint16 rsvd1; union COMPSTS_REG COMPSTS; Uint16 rsvd2; union DACCTL_REG DACCTL; Uint16 rsvd3; union DACVAL_REG DACVAL; Uint16 rsvd4; Uint16 RAMPMAXREF_ACTIVE; Uint16 rsvd5; Uint16 RAMPMAXREF_SHADOW; Uint16 rsvd6; Uint16 RAMPDECVAL_ACTIVE; Uint16 rsvd7; Uint16 RAMPDECVAL_SHADOW; Uint16 rsvd8; Uint16 RAMPSTS; }; With this added, and a test reference to one of the bits in the new structs I rebuilt my project. I hasnt thrown any errors or warnings at me, however the C variable reference that I tested with "Comp1Regs.DACCTL.bit.DACSOURCE = 0;" the child member names text have not turned blue as they do with other struct and union member references. also if I "ctrl+click" on any of the member names, e.g. DACCTL, the IDE says "Could not find symbol "DACCTL" in index... Does this mean my changes have not actually had any effect? What else would I need to do? Thanks
  4. Hi Trey, Thanks a mill for getting back so quick! So essentially what I need to do is alter the COMP_REGS struct in my version of the DSP2802x_Comp.h, adding the child unions/structs where needed, to match the _COMP_Obj_ in the comp.h you mentioned? Looking back through the DSP2802x_GlobalVariableDefs.c and DSP2802x_Headers_nonBIOS.cmd it seems the correct allocation and placement is already taken care of. But is there anywhere else I would need to make amendments that you might know? I dont see any mention of comparators at all in PeripheralAddress_ASM.h, for example, so I guess nothing needs to change there? Thanks again
  5. Hi Folks The documentation for the comparator block on the F28027 (SPRUGE5) mentions the ability to have the reference DAC produce a ramp. It goes on to describe several registers that are used to set this up, DACCTL for example. However I have not been able to find any other mention of this ability or these registers in any other (device-relevant) document or include file. Is this feature actually implemented? Which peripheral header file should include the relevant register structure? or what register structure are they under? Thanks Note: I have posted a question to the same effect on the e2e forums but no-one answered... usually not a good sign!
×
×
  • Create New...