Jump to content
43oh

Recommended Posts

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.

Link to post
Share on other sites
  • Replies 107
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Hi, After a couple of hours of work porting the enc26j80 driver from my own mini ipv6 stack to uip, I have my enc28j60 booster pack working with the Stellaris Launchpad. The current example code i

Ok, this took a bit longer than I had anticipated, and there is a lot of room for improvements. I extended the example as suggested by BlueHash to be able to read and toggle the GPIO-pins via a web-b

hi,  i tried enc module but froze on "wainting for ip" Welcome ENC_ESTAT: 1 Econ: 0 Silicon Revision: 6

Posted Images

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.

Link to post
Share on other sites

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!

Link to post
Share on other sites

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?

Link to post
Share on other sites

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 :-)

Link to post
Share on other sites

I finally got around finishing the second revision of the ENC28J60 Booster Pack:

 

In-action:

post-19-14264605228096_thumb.jpg

 

PCB Top:

post-19-14264605228633_thumb.jpg

 

PCB Bottom:

post-19-14264605229134_thumb.jpg

 

The three major changes are:

  1. Fix a routing error (MISO, MOSI were swapped)
  2. Make it smaller
  3. 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 :-)

Link to post
Share on other sites

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! :D it finally compiled/flashed, and worked. I can ping it successfully. onward and upward ;-)

Link to post
Share on other sites

 

in other news, i setup the toolchain you linked to, yay! :D 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.

Link to post
Share on other sites

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 by stelo
Link to post
Share on other sites

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.

Link to post
Share on other sites

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);

 

Link to post
Share on other sites

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.

Link to post
Share on other sites

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...