Jump to content

Anguel

Members
  • Content Count

    12
  • Joined

  • Last visited

Everything posted by Anguel

  1. Hi! I am trying to implement a self-powered USB device (CDC) with the Stellaris Launchpad. Unfortunately, it turned out that the LM4F120 MCU has limited "device only" USB controller which does not feature the dedicated VBUS sensing pin USB0VBUS (PB1) that is required to make StellarisWare USBlib work properly and catch the USB_EVENT_DISCONNECTED event on a self-powered device. Fortunately, the board has another GPIO pin (PD7) which is connected for VBUS sensing but nowhere is documented how this pin can be used with USBlib. Now my question is how to implement the self-powered device properly on this board, starting with the original usb_dev_serial code from StellarisWare. I am new to StellarisWare and find some docs incomplete and confusing. Also I am not completely sure that StellarisWare's USBlib has been adapted to this board properly... First, do I have to call USBDCDInit() with the USB_MODE_DEVICE or with the USB_MODE_FORCE_DEVICE parameter on this MCU or doesn't it matter at all? Then as far as I understand I need to configure my own interrupt handler for the VBUS sensing on PD7. Maybe when VBUS is present I should call the USBDCDInit() function and when VBUS is lost (caused by a USB cable disconnect) I should call USBDCDCTerm(). Is this the correct way to do it in order to also comply with the USB requirements. The docs for other Stellaris MCUs featuring USB Device/OTG/Host state that if the host removes VBUS, a self-powered Device has to disable the D+/D- pull-up resistors. Unfortunately, I did not find any demo code for that. How can this be achieved on this board with StellarisWare calls? BTW, I have already asked a very similar question on the TI forums but did not get much information: http://e2e.ti.com/support/microcontrollers/stellaris_arm/f/901/t/250587.aspx Therefore, I hope that the experts here can give me some hints. Thank you in advance! Anguel
  2. Thank you for the feedback Trey. You are correct and I am afraid that the 32 KWords on the C2000 may be insufficient for more general-purpose embedded applications. So I will reconsider if it is not more suitable to use a TI Cortex M4F instead. This approach looks more universal and if I understand correctly, the Stellaris peripheral drivers are mature in contrast to the C2000 peripheral drivers. Is this correct?
  3. Hi! Yesterday I learned to know that chars ("bytes") on C2000 are actually 16 bit words :-( Unfortunately this is a complete waste of memory when we just need a simple byte (8 bits). For example take the C2000 launchkit demo and look at the memory map for the ti_ascii char array constant defined in ti_ascii.h. I wonder if there is an easy way to enter string constants so that they do not occupy twice the memory they actually need. The only way I can imagine is to enter them in HEX so that one 16 bit word actually contains two 8 bit chars. But this is very unfriendly as one has to type the hex code for each char instead of entering them as readable chars. Regards, Anguel
  4. Tray, thank you for the help. Maybe it just had something to do with the auto-update I did to my CCS 5.3, now the problem does not reappear, although I am testing with exactly the same projects (your demo project is in flash and the others are injected by the debugger into RAM). BTW, after the auto-update of CCS 5.3 I got some errors listed after install finished but things still seem to work ok. I now have the old v6.1.0 and the new v6.1.2 compiler but I also got each debugger (e.g. XDS100v2) listed twice in the project settings dropdown. Is this expected and can I uninstall the older version somehow? Anguel
  5. The teaching rom is actually the best source, unfortunately it is for CCS 4 only. This workshop is also nice and for CCS 5 but unfortunately the explanations are not that extensive: http://software-dl.ti.com/trainingTTO/trainingTTO_public_sw/c28x28069/C28x_Microcontroller_MDW_4-0.pdf Regards, Anguel
  6. gsrunion, This is a very good idea. I am new to TI and the C2000 but I am already very disappointed. It is a joke that a big company like them is not able to provide working drivers and good docs for a MCU they advertise so extensively. Instead, they leave all the hard work to each single developer. I am now trying to dig into the docs and if I have more experience in the future, I will try to contribute to this project. Best regards, Anguel
  7. Hi! I am currently experimenting to get the real-time debug mode running on the c2000 launchpad but no matter what I do I always get the following error: Trouble Reading PC Register: (Error -1142 @ 0x0) Device blocked debug access because it is currently executing non-debuggable code. Choose 'Rude Retry' to disable polite mode and force the operation. (Emulation package 5.1.8.0) I am using CCS 5.3 with latest updates and latest controlSUITE. I also tried with a blank project. Normal debugging is fine, but real-time mode does not work :-( UPDATE: The blinking led project as described here http://www.forum.c2kcentral.com/topic/89-real-time-control-a-c2000-debugging-gem/ actually seems to work, but the c2000 launchpad demo does not. The above error is shown. UPDATE 2: Probably the problem has something to do with some special settings, e.g. is a call to CPU_enableDebugInt() required? UPDATE 3: Now it seems to work :-) I have not really changed anything, probably just restarted CCS. So the trick is to enable real-time debug, then run and if the vars don't refresh, to just toggle the "continuous refresh" button until refresh begins. The instructions in the link above are very good. Thanks in advance for any help. Regards, Anguel
  8. Thank you Tray. It is always a good thing to be able to discuss problems with someone like you and I am happy that you really care about your product. I received your board yesterday and hope to be able to get started soon. Unfortunately, we are a small company and have many other projects running in parallel. What I really liked about your board is that it is very inexpensive and compact and has opto-isolation and an FTDI chip. And the C2000 chip also seems to be very nice. We plan to develop some electronics devices with it. Normally in our designs we will interface other SPI and I2C chips and therefore I was hoping for robust drivers, I got the impression that the Stellaris MCUs have wonderful drivers and somehow expected the same from the C2000 which does not contain so complex hardware. Additionally, TI now offers so much ready-to-go and integrated stuff with Concerto (which includes a C2000) and TI RTOS. Therefore I am now very confused that the basic drivers on the C2000 do not work reliably. Previously I wanted to use a PIC32 board that has USB & Ethernet on board, but unfortunately it turned out that getting this to run reliably in software will simply take too much time we don't have. And IMHO software solutions are still not as robust as external chips like the FTDI. We are using the same FTDI chip on an FPGA board and like it. Besides that, Microchips USB and TCP/IP stacks are not completely bug free, although I must say that their complexity is not comparable to simple I2C drivers... So is there any chance that the I2C drivers will work in the current state they are when you say that they are incomplete? I was really hoping that they will at least do something, as there is even an I2C EEPROM example included. What purpose should that example have if the drivers do not work? Regards, Anguel
  9. Ok, now I am really confused. When I look into controlSUITE I see this folder: C:\ti\controlSUITE\device_support\f2802x\v210. This makes me think that the drivers are stable and in version 2.10. You tell me that some (or many?) of those drivers are untested Where is it documented which drivers are tested and which are not? Or do we have to guess? And why does TI release untested drivers at all? I really appreciate your help but I have the impression that you are the only engineer at TI who really cares about the C2000 and who is doing all the development for the hardware and for the software. Released but untested drivers for the main MCU modules are something that really scares me. I really hope that TI does not target only amateurs with the C2000 MCUs. At least the things I see so far are far away from professional. Regards, Anguel
  10. Sorry, I don't really understand: As far as I see the I2C drivers in the controlSUITE are the official I2C drivers for the F2802x MCUs and not some special drivers for the launchpad. Actually the launchpad is just forwarding the MCU signals. So these drivers should be normally completely tested and working. They seem to be almost identical or even identical for all C2000 MCUs. I just can't imagine that TI does not have working and tested I2C drivers for its real-time 32 bit MCUs. Or do I misunderstand something? The i2c.c files for your board and for the MCU are exactly the same.
  11. Tray, Thank you very much for the fast reply. Now I understood how it works :-) Very clever design. Unfortunately it seems that the I2C drivers are not documented at all in the F2802x Peripheral Driver Library :-( Also looking at the driver files there is something wrong: They contain "to be done comments" e.g. in the F2802x_I2C.c and it seems that one has to manually uncomment the pins there to use GPIO 32+33 instead of GPIO 28+29 which are occupied by the USB. Do the I2C drivers work at all? Best regards, Anguel
  12. Hi! I am looking at the interesting C2000 Launchpad and just discovered this forum :-) My question is regarding serial communication with external chips. I see that the Launchpad's C2000 has only 1 x SCI, 1 x SPI and 1 x I2C. Then I discovered that the SCI seems to be already occupied with the USB chip on the Launchpad (ok, one can turn off USB but I want to use it). So my question is what other serial buses can be still used on the board. As far as I can see I should be able to use SPI only but I2C is not usable as it seems to use the same pins as the SCI. Is this correct or did I overlook something? Any tips and comments are welcome :-) Thank you in advance! Regards, Anguel
×
×
  • Create New...