diff options
| author | bernard.xiong <[email protected]> | 2010-05-27 09:43:49 +0000 |
|---|---|---|
| committer | bernard.xiong <[email protected]> | 2010-05-27 09:43:49 +0000 |
| commit | a5b48e361e975d3b9272d77fe87299af3b12e092 (patch) | |
| tree | b8dba402b42e5bac8f1d2f6f69d2436b75e6ef89 /bsp | |
| parent | 5b91286805b21d39b9d0321dd515dc2bcd7ff8b3 (diff) | |
fix ENET interrupt issue; fix the end address of heap issue.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@738 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp')
| -rw-r--r-- | bsp/lpc176x/emac.c | 9 | ||||
| -rw-r--r-- | bsp/lpc176x/startup.c | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/bsp/lpc176x/emac.c b/bsp/lpc176x/emac.c index 235a72df28..8d1c370ec1 100644 --- a/bsp/lpc176x/emac.c +++ b/bsp/lpc176x/emac.c @@ -29,8 +29,14 @@ void ENET_IRQHandler(void) {
rt_uint32_t status;
+ /* enter interrupt */
+ rt_interrupt_enter();
+
status = LPC_EMAC->IntStatus & LPC_EMAC->IntEnable;
+ /* Clear the interrupt. */
+ LPC_EMAC->IntClear = status;
+
if (status & INT_RX_DONE)
{
/* Disable EMAC RxDone interrupts. */
@@ -44,6 +50,9 @@ void ENET_IRQHandler(void) /* release one slot */
rt_sem_release(&sem_slot);
}
+
+ /* leave interrupt */
+ rt_interrupt_leave();
}
/* phy write */
diff --git a/bsp/lpc176x/startup.c b/bsp/lpc176x/startup.c index dce89005ab..b517e64eca 100644 --- a/bsp/lpc176x/startup.c +++ b/bsp/lpc176x/startup.c @@ -85,12 +85,12 @@ void rtthread_startup(void) #ifdef RT_USING_HEAP
#ifdef __CC_ARM
- rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x10004000);
+ rt_system_heap_init((void*)&Image$$RW_IRAM1$$ZI$$Limit, (void*)0x10008000);
#elif __ICCARM__
- rt_system_heap_init(__segment_end("HEAP"), (void*)0x10004000);
+ rt_system_heap_init(__segment_end("HEAP"), (void*)0x10008000);
#else
/* init memory system */
- rt_system_heap_init((void*)&__bss_end, (void*)0x10004000);
+ rt_system_heap_init((void*)&__bss_end, (void*)0x10008000);
#endif
#endif
|
