Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sleep to LPC81x #112

Merged
merged 1 commit into from
Nov 21, 2013
Merged

Added sleep to LPC81x #112

merged 1 commit into from
Nov 21, 2013

Conversation

Sissors
Copy link
Contributor

@Sissors Sissors commented Nov 21, 2013

http://mbed.org/users/mbed_official/code/mbed-src/pull-request/6

This is my first time done anything using github, and since I made it in the online compiler I just copy pasted it in explorer in the end. I do not have the entire build chain setup here, so I haven't tested it that way.

@emilmont
Copy link
Contributor

Hi Erik,
thank you for this contribution.

Could you please accept our Contributor Agreement? (You need to be logged in with your mbed.org account)
http://mbed.org/contributor_agreement/

Thanks,
Emilio

@Sissors
Copy link
Contributor Author

Sissors commented Nov 21, 2013

Done :)

emilmont added a commit that referenced this pull request Nov 21, 2013
@emilmont emilmont merged commit 6a5335a into ARMmbed:master Nov 21, 2013
oampo pushed a commit to spectaclelabs/mbed that referenced this pull request Dec 6, 2013
I was doing some debugging that had me looking at the disassembly of
lpc_rx_queue() from within the debugger.  I was looking for the call to
pbuf_alloc() that we see in the following code snippet:
		p = pbuf_alloc(PBUF_RAW, (u16_t) EMAC_ETH_MAX_FLEN, PBUF_RAM);
		if (p == NULL) {
			LWIP_DEBUGF(UDP_LPC_EMAC | LWIP_DBG_TRACE,
				("lpc_rx_queue: could not allocate RX pbuf (free desc=%d)\n",
				lpc_enetif->rx_free_descs));
			return queued;
		}

		/* pbufs allocated from the RAM pool should be non-chained. */
		LWIP_ASSERT("lpc_rx_queue: pbuf is not contiguous (chained)",
			pbuf_clen(p) <= 1);

When I was looking through the disassembly for this code I noticed a
call to pbuf_clen() in the actual machine code.
=> 0x0000bab0 <+24>:	bl	0x44c0 <pbuf_clen>
   0x0000bab4 <+28>:	ldr	r3, [r4, ARMmbed#112]	; 0x70
   0x0000bab6 <+30>:	ldrh.w	r12, [r5, ARMmbed#10]
   0x0000baba <+34>:	add.w	r2, r3, ARMmbed#9
   0x0000babe <+38>:	add.w	r0, r12, #4294967295	; 0xffffffff

The only call to pbuf_clean made from this function is made from
within the LWIP_ASSERT.  When I looked more closely at how this macro
was defined, I saw that the mbed version of the stack had disabled the
LWIP_PLATFORM_ASSERT macro when LWIP_DEBUG was false which means that
no action will be taken if the assert is false but it still allows the
LWIP_ASSERT macro to potentially evaluate the assert expression.
Defining the LWIP_NOASSERT macro will fully disable the LWIP_ASSERT
macro.

I saw one of my TCP/IP samples shrink about 0.5K when I made this
change.
bridadan pushed a commit that referenced this pull request Jun 21, 2016
Implement the .mbedignore functionality.
yossi2le pushed a commit to yossi2le/mbed-os that referenced this pull request Jan 2, 2019
leave more space for test binary
remove minimal printf in tests because it
is messing with gt communication
lrusinowicz pushed a commit to lrusinowicz/mbed-os that referenced this pull request Feb 5, 2019
Updating mbed-os to mbed-os-5.7.4
pan- added a commit to pan-/mbed that referenced this pull request May 29, 2020
Add MAC address printouts to examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants