xpg 127 Posted January 25, 2013 Author Share Posted January 25, 2013 hmm, well as is typical for me. one mountain crossed another on the horizon looms. so I got the programmed flashed and running, with the ETH chip wired up. Now I am getting a hard fault like jalder This is really interesting. No modifications made to the code? I will tryk to reproduce this again. Quote Link to post Share on other sites
jalder 0 Posted January 27, 2013 Share Posted January 27, 2013 xpg and soccou, Sorry for the delay in response, got a newborn on my hands so no progress has been made on much of anything. I have had time to think though, and was wondering if there was any interest in getting the enc28j60 booster working in FreeRTOS for the stellaris? It may be more flexible in the long run to allow merging of different stellaris + freertos projects to combine their tasks into other projects. Quote Link to post Share on other sites
MrDoomBringer 0 Posted January 28, 2013 Share Posted January 28, 2013 Hey there, It's been a while but I just got back to the networking side of my project, after busying myself building a 1-Wire library for the Stellaris. I just got the code to work properly and I feel most silly for the reason. I ran into an issue in my project (C++ based) with memory limits, where it would stop execution but still be responsive to controls from the debugger. I poked through the makefile and tried to validate those with CCS linker settings. Looks like the --stack_size needed to be bumped to 512 and the --heap_size to 2000. Sending/recieving just fine and the page is loading properly. Now to interface this with my OneWire library and I'm all set. Thanks for a great library! Quote Link to post Share on other sites
soccou 1 Posted January 28, 2013 Share Posted January 28, 2013 Hi MrDoomBringer, You are using CCS successfully? Are you using the lwip branch? I got the lwip branch to compile, but I had to switch over to linux/gcc to get it to compile. I am not very familiar with CCS, and every time I tried to compile I got a bunch of unresolved includes to the lwip dependencies. Did you experience that? Quote Link to post Share on other sites
MrDoomBringer 0 Posted January 28, 2013 Share Posted January 28, 2013 I'm getting the same issues as you on the lwip branch. As I didn't feel like diving into it just yet I went with the master branch and got that working. I'll take a look at the includes at some other point, but for now the primary branch is working. Quote Link to post Share on other sites
xpg 127 Posted January 28, 2013 Author Share Posted January 28, 2013 This is really interesting. No modifications made to the code? I will tryk to reproduce this again. Ok, I have finally reproduced this. I just had to use the toolchain from https://github.com/esden/summon-arm-toolchain. Using my regular toolchain from https://github.com/jsnyder/arm-eabi-toolchain seems to work fine, though. I have no idea why this is so, but at least I can start debugging the issue :-) Quote Link to post Share on other sites
xpg 127 Posted January 28, 2013 Author Share Posted January 28, 2013 I finally got around finishing the second revision of the ENC28J60 Booster Pack: In-action: PCB Top: PCB Bottom: The three major changes are: Fix a routing error (MISO, MOSI were swapped) Make it smaller Make ENC-RESET, ENC-INT and SRAM-CS selectable If anyone interested in either PCB or an assembled version please PM me. PCB is 5 USD + shipping, while an assembled board is 20 USD + shipping. Given that ENC28J60 breakouts are available very cheaply on E-Bay I doubt there will be much interest :-) zborgerd 1 Quote Link to post Share on other sites
soccou 1 Posted January 30, 2013 Share Posted January 30, 2013 Ok, I have finally reproduced this. I just had to use the toolchain from https://github.com/esden/summon-arm-toolchain. Using my regular toolchain from https://github.com/jsnyder/arm-eabi-toolchain seems to work fine, though. I have no idea why this is so, but at least I can start debugging the issue :-) Hey xpg, your new board looks good. very impressive. in other news, i setup the toolchain you linked to, yay! it finally compiled/flashed, and worked. I can ping it successfully. onward and upward ;-) Quote Link to post Share on other sites
xpg 127 Posted January 30, 2013 Author Share Posted January 30, 2013 in other news, i setup the toolchain you linked to, yay! it finally compiled/flashed, and worked. I can ping it successfully. onward and upward ;-) That's good to hear. I will look further into this soon. I really curious about what differences in the toolchain results in this kind of error. Quote Link to post Share on other sites
rudy 1 Posted February 2, 2013 Share Posted February 2, 2013 (edited) That sounds a bit strange. As the Silicon Revision is reported correctly, the MISO/MOSI and CLK lines are ok. Is the interrupt line correctly connected? It's supposed to be on PE4. Are you using the lwIP or the uIP version? Im used uIP. I tried lwip version. Lwip print this: EDIT: Finally works it! I use uIP and toolchain https://github.com/jsnyder/arm-eabi-toolchain Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6 int enabled [Hard fault handler - all numbers in hex] R0 = 20004f44 R1 = 20004fb9 R2 = 128d0 R3 = 6 R12 = 6 LR [R14] = 0 subroutine call return address PC [R15] = c6df program counter PSR = 12250 BFAR = e000ed38 CFSR = 10000 HFSR = 40000000 DFSR = 0 AFSR = 0 Edited February 2, 2013 by stelo Quote Link to post Share on other sites
zborgerd 62 Posted February 5, 2013 Share Posted February 5, 2013 I will buy one of these booster packs. Look for my PM! Does this include headers? I have used summon-arm in the past but got lazy yesterday after a fresh install of Ubuntu 12.10 and decided on prebuilt toolchains. Too many other things to worry about and other toolchains to install to get my build environment back in order. I decided to try this precompiled toolchain and it seems to work well so far. https://launchpad.net/gcc-arm-embedded . Seems fine so far. Quote Link to post Share on other sites
MrDoomBringer 0 Posted February 9, 2013 Share Posted February 9, 2013 Just as a note for anyone who wants to both break compatability with the boosterpack and simplify the pin assignments for the Stellaris Launchpad, you can move the SSI connection from SSI2 to SSI3. The connections move SI, SO and SCK (on my board specifically, SI/SO might be swapped) are moved to the same side of the board as all other connections except for the reset cable, which is of course a hard connection to the RESET pin. I'm working on moving the reset functionality over to software (handled in the init) so that I can move that connection over as well. NEW: SI -> PD2 SO -> PD3 SCK -> PD0 The main.c file contains the spi_init function. Replace that function with this: static void spi_init(void) { MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD); // Configure SSI2 for SPI RAM usage MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI3); MAP_GPIOPinConfigure(GPIO_PD0_SSI3CLK); MAP_GPIOPinConfigure(GPIO_PD2_SSI3RX); MAP_GPIOPinConfigure(GPIO_PD3_SSI3TX); MAP_GPIOPinTypeSSI(GPIO_PORTD_BASE, GPIO_PIN_0 | GPIO_PIN_2 | GPIO_PIN_3); MAP_SSIConfigSetExpClk(SSI3_BASE, MAP_SysCtlClockGet(), SSI_FRF_MOTO_MODE_0, SSI_MODE_MASTER, 1000000, 8); MAP_SSIEnable(SSI3_BASE); unsigned long b; while(MAP_SSIDataGetNonBlocking(SSI3_BASE, &) {} } Further down the file, these lines (Line numbers probably won't match up, I've been fiddling, names are the same: uint8_t spi_send(uint8_t c) { unsigned long val; MAP_SSIDataPut(SSI3_BASE, c); MAP_SSIDataGet(SSI3_BASE, &val); return (uint8_t)val; } Then go to httpd.c and edit these lines: SETUP_PIN(j1[2], GPIO_PORTB_BASE, GPIO_PIN_0, CONFIG_INPUT); SETUP_PIN(j1[3], GPIO_PORTB_BASE, GPIO_PIN_1, CONFIG_INPUT); SETUP_PIN(j1[4], GPIO_PORTE_BASE, GPIO_PIN_4, CONFIG_INPUT); // Now usable PIN_UNUSED(j1[5]); // PE5 SETUP_PIN(j1[6], GPIO_PORTB_BASE, GPIO_PIN_4, CONFIG_INPUT); PIN_UNUSED(j1[7]); // PA5 SETUP_PIN(j1[8], GPIO_PORTA_BASE, GPIO_PIN_6, CONFIG_INPUT); SETUP_PIN(j1[9], GPIO_PORTA_BASE, GPIO_PIN_7, CONFIG_INPUT); PIN_UNUSED(j2[0]); // GND SETUP_PIN(j2[1], GPIO_PORTB_BASE, GPIO_PIN_2, CONFIG_INPUT); SETUP_PIN(j2[2], GPIO_PORTE_BASE, GPIO_PIN_0, CONFIG_INPUT); PIN_UNUSED(j2[3]); // PF0 -- not used PIN_UNUSED(j2[4]); // RESET SETUP_PIN(j2[5], GPIO_PORTB_BASE, GPIO_PIN_7, CONFIG_INPUT); // Now usable SETUP_PIN(j2[6], GPIO_PORTB_BASE, GPIO_PIN_6, CONFIG_INPUT); // Now usabe SETUP_PIN(j2[7], GPIO_PORTA_BASE, GPIO_PIN_4, CONFIG_INPUT); SETUP_PIN(j2[8], GPIO_PORTA_BASE, GPIO_PIN_3, CONFIG_INPUT); SETUP_PIN(j2[9], GPIO_PORTA_BASE, GPIO_PIN_2, CONFIG_INPUT); PIN_UNUSED(j3[0]); // 5.0V PIN_UNUSED(j3[1]); // GND PIN_UNUSED(j3[2]); // PD0 -- SSI3 SETUP_PIN(j3[3], GPIO_PORTD_BASE, GPIO_PIN_1, CONFIG_INPUT); PIN_UNUSED(j3[4]); // PD2 -- SSI3 PIN_UNUSED(j3[5]); // PD3 -- SSI3 SETUP_PIN(j3[6], GPIO_PORTE_BASE, GPIO_PIN_1, CONFIG_INPUT); xpg 1 Quote Link to post Share on other sites
xpg 127 Posted February 9, 2013 Author Share Posted February 9, 2013 Thanks for sharing MrDoomBringer. Indeed a good advice for anyone using regular breakout boards. Quote Link to post Share on other sites
zborgerd 62 Posted February 12, 2013 Share Posted February 12, 2013 I ordered a board from xpg just a few days ago and it already arrived from all the way across the world, and it looks and works great! I was able to have his demo application up and running in minutes with the toolchain that I linked a few posts up. Even though I already own a few of those cheap Ebay ENC28J60 breakouts, this board is a better option if you want something that just works. I'll probably also end up using the Ebay breakouts with my STM32F4 when I finally get some F/F jumpers in a few days. xpg 1 Quote Link to post Share on other sites
xpg 127 Posted February 12, 2013 Author Share Posted February 12, 2013 I ordered a board from xpg just a few days ago and it already arrived from all the way across the world, and it looks and works great! I was able to have his demo application up and running in minutes with the toolchain that I linked a few posts up. Even though I already own a few of those cheap Ebay ENC28J60 breakouts, this board is a better option if you want something that just works. I'll probably also end up using the Ebay breakouts with my STM32F4 when I finally get some F/F jumpers in a few days. Thank you for the kind words. 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.