RobLewis 7 Posted October 30, 2013 Share Posted October 30, 2013 Trying to install latest Energia (10) in Mavericks and not seeing any serial ports (either in Energia or in the Network control panel). I installed the 1.0.3b package. I have no idea what a codeless kext is, but I do not have anything like "ez430 Quote Link to post Share on other sites
RobLewis 7 Posted October 31, 2013 Share Posted October 31, 2013 Got a good working commit today, but need to press connect and disconnect a few times to get it to work. Next is clean up, since we know what device we are dealing with, I will remove all unnecessary code etc. A shot of the Terminal with real time data from my Energy Harvesting kit. Attached nicely to the USB interface as a BSD port Looking through your old posts trying to figure out why serial driver isn't working (with Mavericks). What Terminal program is this a screenshot of? Looks good. Quote Link to post Share on other sites
RobLewis 7 Posted November 23, 2013 Share Posted November 23, 2013 Hello. Does this driver work with the MSP430F5529 LaunchPad? I programmed the LaunchPad with Energia on a PC, and it currently works when connected via USB to a Mac running Mavericks, apparently with the built-in USB/serial driver. My software (XTension Home Automation package) recognizes it as an Arduino and receives data OK. The problem is I have to unplug and replug the USB cable after a system restart to get it to be recognized. Quote Link to post Share on other sites
jpnorair 340 Posted November 24, 2013 Share Posted November 24, 2013 Hello. Does this driver work with the MSP430F5529 LaunchPad? I programmed the LaunchPad with Energia on a PC, and it currently works when connected via USB to a Mac running Mavericks, apparently with the built-in USB/serial driver. My software (XTension Home Automation package) recognizes it as an Arduino and receives data OK. The problem is I have to unplug and replug the USB cable after a system restart to get it to be recognized. I have done a ton of work on TI MSP430 USB myself, there are indeed some bugs in the TI USB firmware stack. I've fixed the bugs myself, but you can try this workaround (code below) for their buggy stack. Put it right where usb_init() is called in the TI C code. In particular, the TI USB stack does not notify the host that it is restarting, which is why you need to unplug and re-plug the cable. usb_init(); usb_disconnect(); //disconnect USB first: you can remove this with fixed driver //See if we're already attached physically to USB, and if so, connect to it. //Normally applications don't invoke the event handlers, but this is an exception. if (USBPWRCTL & USBBGVBV){ usbevt_vbuson(); } Disclaimer: function nomenclature might be slightly different than that in TI source. But, it should make sense. Quote Link to post Share on other sites
RobLewis 7 Posted November 24, 2013 Share Posted November 24, 2013 I have done a ton of work on TI MSP430 USB myself, there are indeed some bugs in the TI USB firmware stack. I've fixed the bugs myself, but you can try this workaround (code below) for their buggy stack. Put it right where usb_init() is called in the TI C code. In particular, the TI USB stack does not notify the host that it is restarting, which is why you need to unplug and re-plug the cable. usb_init(); usb_disconnect(); //disconnect USB first: you can remove this with fixed driver //See if we're already attached physically to USB, and if so, connect to it. //Normally applications don't invoke the event handlers, but this is an exception. if (USBPWRCTL & USBBGVBV){ usbevt_vbuson(); } Disclaimer: function nomenclature might be slightly different than that in TI source. But, it should make sense. Thanks very much. But as I'm new and fairly ignorant, I don't see how to apply your advice. Here is my entire setup routine: void setup() { Serial.begin(9600); // Initialize serial port pinMode(PUSH2, INPUT_PULLUP); // Hold button 2 to quit pinMode(GREEN_LED, OUTPUT); // added by GRL pinMode(RED_LED, OUTPUT); // added by GRL Wire.begin(); // initialize I2C that connects to sensor mySensor.begin(); // Initialize AM2302 (DHT22) humidity sensor PSensor.begin(); // Initalize BMP085 pressure sensor (GRL inserted) Serial.println("AM2302 & BMP085 sensors initialized"); // GRL modified Serial.println("Press & hold LaunchPad user button 2 to end"); // GRL modified } Can you tell me what I need to do? This code works on the F5529 LaunchPad, with built-in USB hub and 2 virtual serial ports. As you can see, I have no call to usb_init(). Quote Link to post Share on other sites
jpnorair 340 Posted November 24, 2013 Share Posted November 24, 2013 Thanks very much. But as I'm new and fairly ignorant, I don't see how to apply your advice. Here is my entire setup routine: You would need to recompile the C library. Energia is built on C libraries. Before your setup() function ever runs, there are library functions that ran. Quote Link to post Share on other sites
RobLewis 7 Posted November 30, 2013 Share Posted November 30, 2013 You would need to recompile the C library. Energia is built on C libraries. Before your setup() function ever runs, there are library functions that ran. OK, I'm sort of flailing around here. I found the functions USB_init() and USB_disconnect() in the usb.c file in Energia's \hardware\msp430\libraries\USBSerial\ folder. Am I on the right track? Assuming I am, i guess now I have to find the initialization code that calls these functions so I can make your patch and try to recompile. Any pointers appreciated. Quote Link to post Share on other sites
RobLewis 7 Posted November 30, 2013 Share Posted November 30, 2013 I have done a ton of work on TI MSP430 USB myself, there are indeed some bugs in the TI USB firmware stack. I've fixed the bugs myself, but you can try this workaround (code below) for their buggy stack. Put it right where usb_init() is called in the TI C code. In particular, the TI USB stack does not notify the host that it is restarting, which is why you need to unplug and re-plug the cable. usb_init(); usb_disconnect(); //disconnect USB first: you can remove this with fixed driver //See if we're already attached physically to USB, and if so, connect to it. //Normally applications don't invoke the event handlers, but this is an exception. if (USBPWRCTL & USBBGVBV){ usbevt_vbuson(); } Disclaimer: function nomenclature might be slightly different than that in TI source. But, it should make sense. OK, in the "different nomenclature" department, is it possible that what you're calling "usbevt_vbuson" is the function "USB_handleVbusOnEvent()" that I found in \hardware\msp430\libraries\USBSerial\usbEventHandling.c? Still haven't found the initialization routine that's calling these handlers. Quote Link to post Share on other sites
RobLewis 7 Posted November 30, 2013 Share Posted November 30, 2013 Ok, I finally found what seems to be the relevant section of initialization code, in the USBSerial.cpp file. Here it is: // // Public methods // void USBSerial::begin() { __disable_interrupt(); //Enable interrupts globally //Initialization of clock module if (USB_PLL_XT == 2){ #if defined (__MSP430F552x) || defined (__MSP430F550x) P5SEL |= 0x0C; //enable XT2 pins for F5529 #elif defined (__MSP430F563x_F663x) P7SEL |= 0x0C; #endif XT2_Start(XT2DRIVE_0); //Start the "USB crystal" } else { #if defined (__MSP430F552x) || defined (__MSP430F550x) P5SEL |= 0x10; //enable XT1 pins #endif XT1_Start(XT1DRIVE_0); //Start the "USB crystal" } USB_init(); //Init USB //Enable various USB event handling routines USB_setEnabledEvents(kUSB_allUsbEvents); // See if we're already attached physically to USB, and if so, connect to it // Normally applications don't invoke the event handlers, but this is an exception. if (USB_connectionInfo() & kUSB_vbusPresent) USB_handleVbusOnEvent(); __enable_interrupt(); //Enable interrupts globally } Could you possibly explain exactly how to insert your patch in here (assuming this is the right section of code)? (Just as a reminder, it's the MSP430F5529 LaunchPad I'm using.) Thanks for any assistance. Quote Link to post Share on other sites
RobLewis 7 Posted December 16, 2013 Share Posted December 16, 2013 Any news on this, @@jpnorair ? Quote Link to post Share on other sites
jpnorair 340 Posted December 16, 2013 Share Posted December 16, 2013 Any news on this, @@jpnorair ? Sorry to break the news but: I'm very busy and I don't use Energia, so this is not a problem towards which I'm motivated to contribute more than support. Quote Link to post Share on other sites
RobLewis 7 Posted December 21, 2013 Share Posted December 21, 2013 Perhaps you could answer one question for me. I can't be sure, but maybe your patch (above) consists simply of inserting usb_disconnect() immediately after usb_init(). Assuming that's so, please note that the code I quote above has the following as its next line, coming before the section about "See if we're already attached physically to USB": //Enable various USB event handling routines USB_setEnabledEvents(kUSB_allUsbEvents); That being the case, is it likely that your workaround will still work? Quote Link to post Share on other sites
BobRice 0 Posted November 25, 2014 Share Posted November 25, 2014 Hi, I have been using the MSP430LPCDC 1.0.3b for some time but now it has stopped working for me. It was working on 10.10.1 but now is not recognizing either my Launchpad or my Connected Launchpad - no device files are created. Reinstalling it didn't help. It seemed to stop working when I updated my Prolific PL2303 and FTDI device drivers. I don't know how to debug this problem. There is very little documentation on this driver or even how the VCP connections work. Any suggestions? Bob Rice Quote Link to post Share on other sites
Rei Vilo 695 Posted November 25, 2014 Share Posted November 25, 2014 Apple has changed the way USB drivers are managed. This is a known bug that affected other LaunchPads, like the CC3200. Please open a ticket at the Energia GitHub repository with all the details of you hardware and software configuration. Thank you! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.